X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FCategoryPage.php;h=4baa41388b619a3a69a4636c2e0f5f3c13e6ee07;hb=4a8df703620f599d543ea116a6df67ab76be42ed;hp=fe1fc5bad05a57f37ea4e49c9a4df9b5560197ba;hpb=a46248b4d8a7a68bb9fc93bde06dea5fa18e0bc8;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/CategoryPage.php b/includes/CategoryPage.php index fe1fc5bad0..4baa41388b 100644 --- a/includes/CategoryPage.php +++ b/includes/CategoryPage.php @@ -20,7 +20,8 @@ class CategoryPage extends Article { if ( isset( $diff ) && $diffOnly ) return Article::view(); - if(!wfRunHooks('CategoryPageView', array(&$this))) return; + if( !wfRunHooks( 'CategoryPageView', array( &$this ) ) ) + return; if ( NS_CATEGORY == $this->mTitle->getNamespace() ) { $this->openShowCategory(); @@ -28,10 +29,6 @@ class CategoryPage extends Article { Article::view(); - # If the article we've just shown is in the "Image" namespace, - # follow it with the history list and link list for the image - # it describes. - if ( NS_CATEGORY == $this->mTitle->getNamespace() ) { $this->closeShowCategory(); } @@ -79,7 +76,7 @@ class CategoryViewer { $this->from = $from; $this->until = $until; $this->limit = $wgCategoryPagingLimit; - $this->cat = Category::newFromName( $title->getDBKey() ); + $this->cat = Category::newFromTitle( $title ); } /** @@ -192,7 +189,7 @@ class CategoryViewer { */ function addPage( $title, $sortkey, $pageLength, $isRedirect = false ) { global $wgContLang; - $titletext = $wgContLang->convert($title); + $titletext = $wgContLang->convert( $title->getPrefixedText() ); $this->articles[] = $isRedirect ? '' . $this->getSkin()->makeKnownLinkObj( $title, $titletext ) . '' : $this->getSkin()->makeSizeLinkObj( $pageLength, $title, $titletext ); @@ -317,7 +314,7 @@ class CategoryViewer { $countmsg = $this->getCountMessage( $rescnt, $dbcnt, 'file' ); return "
\n" . - '

' . wfMsg( 'category-media-header', htmlspecialchars($this->title->getText()) ) . "

\n" . + '

' . wfMsg( 'category-media-header', htmlspecialchars( $this->title->getText() ) ) . "

\n" . $countmsg . $this->gallery->toHTML() . "\n
"; } else { return ''; @@ -452,12 +449,12 @@ class CategoryViewer { $sk = $this->getSkin(); $limitText = $wgLang->formatNum( $limit ); - $prevLink = htmlspecialchars( wfMsg( 'prevn', $limitText ) ); + $prevLink = wfMsgExt( 'prevn', array( 'escape', 'parsemag' ), $limitText ); if( $first != '' ) { $prevLink = $sk->makeLinkObj( $title, $prevLink, wfArrayToCGI( $query + array( 'until' => $first ) ) ); } - $nextLink = htmlspecialchars( wfMsg( 'nextn', $limitText ) ); + $nextLink = wfMsgExt( 'nextn', array( 'escape', 'parsemag' ), $limitText ); if( $last != '' ) { $nextLink = $sk->makeLinkObj( $title, $nextLink, wfArrayToCGI( $query + array( 'from' => $last ) ) );