From: Alexandre Emsenhuber Date: Sat, 24 Jan 2009 17:42:12 +0000 (+0000) Subject: * Removed false comment, we are in a Category page, not an Image page X-Git-Tag: 1.31.0-rc.0~43273 X-Git-Url: http://git.cyclocoop.org/%22%40url%40/%24self?a=commitdiff_plain;h=f2e0654b536a282c29d59b8b591c6f3a86a88371;p=lhc%2Fweb%2Fwiklou.git * Removed false comment, we are in a Category page, not an Image page * Use wfMsgExt( 'msg', array( 'escape' ), ... ) rather than htmlspecialchars( wfMsg( ... ) ) * Whitespaces tweaks --- diff --git a/includes/CategoryPage.php b/includes/CategoryPage.php index fe1fc5bad0..a5bdc05dcb 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 ); } /** @@ -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' ), $limitText ); if( $first != '' ) { $prevLink = $sk->makeLinkObj( $title, $prevLink, wfArrayToCGI( $query + array( 'until' => $first ) ) ); } - $nextLink = htmlspecialchars( wfMsg( 'nextn', $limitText ) ); + $nextLink = wfMsgExt( 'nextn', array( 'escape' ), $limitText ); if( $last != '' ) { $nextLink = $sk->makeLinkObj( $title, $nextLink, wfArrayToCGI( $query + array( 'from' => $last ) ) );