dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Special:EditWatchlist/raw now make use of GenderCache"
[lhc/web/wiklou.git]
/
includes
/
CategoryViewer.php
diff --git
a/includes/CategoryViewer.php
b/includes/CategoryViewer.php
index
d83e0e0
..
ddd01eb
100644
(file)
--- a/
includes/CategoryViewer.php
+++ b/
includes/CategoryViewer.php
@@
-122,7
+122,7
@@
class CategoryViewer extends ContextSource {
// Give a proper message if category is empty
if ( $r == '' ) {
// Give a proper message if category is empty
if ( $r == '' ) {
- $r =
wfMsgExt( 'category-empty', array( 'parse' )
);
+ $r =
$this->msg( 'category-empty' )->parseAsBlock(
);
}
$lang = $this->getLanguage();
}
$lang = $this->getLanguage();
@@
-369,7
+369,7
@@
class CategoryViewer extends ContextSource {
if ( $rescnt > 0 ) {
# Showing subcategories
$r .= "<div id=\"mw-subcategories\">\n";
if ( $rescnt > 0 ) {
# Showing subcategories
$r .= "<div id=\"mw-subcategories\">\n";
- $r .= '<h2>' .
wfMsg( 'subcategories'
) . "</h2>\n";
+ $r .= '<h2>' .
$this->msg( 'subcategories' )->text(
) . "</h2>\n";
$r .= $countmsg;
$r .= $this->getSectionPagingLinks( 'subcat' );
$r .= $this->formatList( $this->children, $this->children_start_char );
$r .= $countmsg;
$r .= $this->getSectionPagingLinks( 'subcat' );
$r .= $this->formatList( $this->children, $this->children_start_char );
@@
-383,7
+383,7
@@
class CategoryViewer extends ContextSource {
* @return string
*/
function getPagesSection() {
* @return string
*/
function getPagesSection() {
- $ti =
htmlspecialchars
( $this->title->getText() );
+ $ti =
wfEscapeWikiText
( $this->title->getText() );
# Don't show articles section if there are none.
$r = '';
# Don't show articles section if there are none.
$r = '';
@@
-398,7
+398,7
@@
class CategoryViewer extends ContextSource {
if ( $rescnt > 0 ) {
$r = "<div id=\"mw-pages\">\n";
if ( $rescnt > 0 ) {
$r = "<div id=\"mw-pages\">\n";
- $r .= '<h2>' .
wfMsg( 'category_header', $ti
) . "</h2>\n";
+ $r .= '<h2>' .
$this->msg( 'category_header', $ti )->text(
) . "</h2>\n";
$r .= $countmsg;
$r .= $this->getSectionPagingLinks( 'page' );
$r .= $this->formatList( $this->articles, $this->articles_start_char );
$r .= $countmsg;
$r .= $this->getSectionPagingLinks( 'page' );
$r .= $this->formatList( $this->articles, $this->articles_start_char );
@@
-419,7
+419,7
@@
class CategoryViewer extends ContextSource {
$countmsg = $this->getCountMessage( $rescnt, $dbcnt, 'file' );
$r .= "<div id=\"mw-category-media\">\n";
$countmsg = $this->getCountMessage( $rescnt, $dbcnt, 'file' );
$r .= "<div id=\"mw-category-media\">\n";
- $r .= '<h2>' .
wfMsg( 'category-media-header', htmlspecialchars( $this->title->getText() )
) . "</h2>\n";
+ $r .= '<h2>' .
$this->msg( 'category-media-header', wfEscapeWikiText( $this->title->getText() ) )->text(
) . "</h2>\n";
$r .= $countmsg;
$r .= $this->getSectionPagingLinks( 'file' );
if ( $this->showGallery ) {
$r .= $countmsg;
$r .= $this->getSectionPagingLinks( 'file' );
if ( $this->showGallery ) {
@@
-576,7
+576,7
@@
class CategoryViewer extends ContextSource {
* @return String HTML
*/
private function pagingLinks( $first, $last, $type = '' ) {
* @return String HTML
*/
private function pagingLinks( $first, $last, $type = '' ) {
- $prevLink =
wfMessage
( 'prevn' )->numParams( $this->limit )->escaped();
+ $prevLink =
$this->msg
( 'prevn' )->numParams( $this->limit )->escaped();
if ( $first != '' ) {
$prevQuery = $this->query;
if ( $first != '' ) {
$prevQuery = $this->query;
@@
-590,7
+590,7
@@
class CategoryViewer extends ContextSource {
);
}
);
}
- $nextLink =
wfMessage
( 'nextn' )->numParams( $this->limit )->escaped();
+ $nextLink =
$this->msg
( 'nextn' )->numParams( $this->limit )->escaped();
if ( $last != '' ) {
$lastQuery = $this->query;
if ( $last != '' ) {
$lastQuery = $this->query;
@@
-604,7
+604,7
@@
class CategoryViewer extends ContextSource {
);
}
);
}
- return
"($prevLink) ($nextLink)"
;
+ return
$this->msg('categoryviewer-pagedlinks')->rawParams($prevLink, $nextLink)->escaped()
;
}
/**
}
/**
@@
-688,8
+688,8
@@
class CategoryViewer extends ContextSource {
$this->cat->refreshCounts();
} else {
# Case 3: hopeless. Don't give a total count at all.
$this->cat->refreshCounts();
} else {
# Case 3: hopeless. Don't give a total count at all.
- return
wfMessage
( "category-$type-count-limited" )->numParams( $rescnt )->parseAsBlock();
+ return
$this->msg
( "category-$type-count-limited" )->numParams( $rescnt )->parseAsBlock();
}
}
- return
wfMessage
( "category-$type-count" )->numParams( $rescnt, $totalcnt )->parseAsBlock();
+ return
$this->msg
( "category-$type-count" )->numParams( $rescnt, $totalcnt )->parseAsBlock();
}
}
}
}