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
Fix sql.php --json behavior
[lhc/web/wiklou.git]
/
includes
/
CategoryViewer.php
diff --git
a/includes/CategoryViewer.php
b/includes/CategoryViewer.php
index
79ab8b4
..
a07e1b4
100644
(file)
--- a/
includes/CategoryViewer.php
+++ b/
includes/CategoryViewer.php
@@
-221,8
+221,6
@@
class CategoryViewer extends ContextSource {
* @return string
*/
function getSubcategorySortChar( $title, $sortkey ) {
* @return string
*/
function getSubcategorySortChar( $title, $sortkey ) {
- global $wgContLang;
-
if ( $title->getPrefixedText() == $sortkey ) {
$word = $title->getDBkey();
} else {
if ( $title->getPrefixedText() == $sortkey ) {
$word = $title->getDBkey();
} else {
@@
-231,7
+229,7
@@
class CategoryViewer extends ContextSource {
$firstChar = $this->collation->getFirstLetter( $word );
$firstChar = $this->collation->getFirstLetter( $word );
- return
$wgContLang
->convert( $firstChar );
+ return
MediaWikiServices::getInstance()->getContentLanguage()
->convert( $firstChar );
}
/**
}
/**
@@
-242,7
+240,6
@@
class CategoryViewer extends ContextSource {
* @param bool $isRedirect
*/
function addImage( Title $title, $sortkey, $pageLength, $isRedirect = false ) {
* @param bool $isRedirect
*/
function addImage( Title $title, $sortkey, $pageLength, $isRedirect = false ) {
- global $wgContLang;
if ( $this->showGallery ) {
$flip = $this->flip['file'];
if ( $flip ) {
if ( $this->showGallery ) {
$flip = $this->flip['file'];
if ( $flip ) {
@@
-253,8
+250,8
@@
class CategoryViewer extends ContextSource {
} else {
$this->imgsNoGallery[] = $this->generateLink( 'image', $title, $isRedirect );
} else {
$this->imgsNoGallery[] = $this->generateLink( 'image', $title, $isRedirect );
- $this->imgsNoGallery_start_char[] =
$wgContLang->convert(
- $this->collation->getFirstLetter( $sortkey ) );
+ $this->imgsNoGallery_start_char[] =
MediaWikiServices::getInstance()->
+
getContentLanguage()->convert(
$this->collation->getFirstLetter( $sortkey ) );
}
}
}
}
@@
-266,12
+263,10
@@
class CategoryViewer extends ContextSource {
* @param bool $isRedirect
*/
function addPage( $title, $sortkey, $pageLength, $isRedirect = false ) {
* @param bool $isRedirect
*/
function addPage( $title, $sortkey, $pageLength, $isRedirect = false ) {
- global $wgContLang;
-
$this->articles[] = $this->generateLink( 'page', $title, $isRedirect );
$this->articles[] = $this->generateLink( 'page', $title, $isRedirect );
- $this->articles_start_char[] =
$wgContLang->convert(
- $this->collation->getFirstLetter( $sortkey ) );
+ $this->articles_start_char[] =
MediaWikiServices::getInstance()->
+
getContentLanguage()->convert(
$this->collation->getFirstLetter( $sortkey ) );
}
function finaliseCategoryState() {
}
function finaliseCategoryState() {
@@
-429,7
+424,7
@@
class CategoryViewer extends ContextSource {
* @return string
*/
function getPagesSection() {
* @return string
*/
function getPagesSection() {
- $
ti = wfEscapeWikiText( $this->title->getText()
);
+ $
name = $this->getOutput()->getUnprefixedDisplayTitle(
);
# Don't show articles section if there are none.
$r = '';
# Don't show articles section if there are none.
$r = '';
@@
-445,7
+440,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>' . $this->msg( 'category_header'
, $ti
)->parse() . "</h2>\n";
+ $r .= '<h2>' . $this->msg( 'category_header'
)->rawParams( $name
)->parse() . "</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 );
@@
-459,6
+454,7
@@
class CategoryViewer extends ContextSource {
* @return string
*/
function getImageSection() {
* @return string
*/
function getImageSection() {
+ $name = $this->getOutput()->getUnprefixedDisplayTitle();
$r = '';
$rescnt = $this->showGallery ? $this->gallery->count() : count( $this->imgsNoGallery );
$dbcnt = $this->cat->getFileCount();
$r = '';
$rescnt = $this->showGallery ? $this->gallery->count() : count( $this->imgsNoGallery );
$dbcnt = $this->cat->getFileCount();
@@
-468,10
+464,7
@@
class CategoryViewer extends ContextSource {
if ( $rescnt > 0 ) {
$r .= "<div id=\"mw-category-media\">\n";
$r .= '<h2>' .
if ( $rescnt > 0 ) {
$r .= "<div id=\"mw-category-media\">\n";
$r .= '<h2>' .
- $this->msg(
- 'category-media-header',
- wfEscapeWikiText( $this->title->getText() )
- )->text() .
+ $this->msg( 'category-media-header' )->rawParams( $name )->parse() .
"</h2>\n";
$r .= $countmsg;
$r .= $this->getSectionPagingLinks( 'file' );
"</h2>\n";
$r .= $countmsg;
$r .= $this->getSectionPagingLinks( 'file' );