Index: trunk/phase3/includes/CategoryPage.php |
— | — | @@ -20,7 +20,8 @@ |
21 | 21 | if ( isset( $diff ) && $diffOnly ) |
22 | 22 | return Article::view(); |
23 | 23 | |
24 | | - if(!wfRunHooks('CategoryPageView', array(&$this))) return; |
| 24 | + if( !wfRunHooks( 'CategoryPageView', array( &$this ) ) ) |
| 25 | + return; |
25 | 26 | |
26 | 27 | if ( NS_CATEGORY == $this->mTitle->getNamespace() ) { |
27 | 28 | $this->openShowCategory(); |
— | — | @@ -28,10 +29,6 @@ |
29 | 30 | |
30 | 31 | Article::view(); |
31 | 32 | |
32 | | - # If the article we've just shown is in the "Image" namespace, |
33 | | - # follow it with the history list and link list for the image |
34 | | - # it describes. |
35 | | - |
36 | 33 | if ( NS_CATEGORY == $this->mTitle->getNamespace() ) { |
37 | 34 | $this->closeShowCategory(); |
38 | 35 | } |
— | — | @@ -79,7 +76,7 @@ |
80 | 77 | $this->from = $from; |
81 | 78 | $this->until = $until; |
82 | 79 | $this->limit = $wgCategoryPagingLimit; |
83 | | - $this->cat = Category::newFromName( $title->getDBKey() ); |
| 80 | + $this->cat = Category::newFromTitle( $title ); |
84 | 81 | } |
85 | 82 | |
86 | 83 | /** |
— | — | @@ -317,7 +314,7 @@ |
318 | 315 | $countmsg = $this->getCountMessage( $rescnt, $dbcnt, 'file' ); |
319 | 316 | |
320 | 317 | return "<div id=\"mw-category-media\">\n" . |
321 | | - '<h2>' . wfMsg( 'category-media-header', htmlspecialchars($this->title->getText()) ) . "</h2>\n" . |
| 318 | + '<h2>' . wfMsg( 'category-media-header', htmlspecialchars( $this->title->getText() ) ) . "</h2>\n" . |
322 | 319 | $countmsg . $this->gallery->toHTML() . "\n</div>"; |
323 | 320 | } else { |
324 | 321 | return ''; |
— | — | @@ -452,12 +449,12 @@ |
453 | 450 | $sk = $this->getSkin(); |
454 | 451 | $limitText = $wgLang->formatNum( $limit ); |
455 | 452 | |
456 | | - $prevLink = htmlspecialchars( wfMsg( 'prevn', $limitText ) ); |
| 453 | + $prevLink = wfMsgExt( 'prevn', array( 'escape' ), $limitText ); |
457 | 454 | if( $first != '' ) { |
458 | 455 | $prevLink = $sk->makeLinkObj( $title, $prevLink, |
459 | 456 | wfArrayToCGI( $query + array( 'until' => $first ) ) ); |
460 | 457 | } |
461 | | - $nextLink = htmlspecialchars( wfMsg( 'nextn', $limitText ) ); |
| 458 | + $nextLink = wfMsgExt( 'nextn', array( 'escape' ), $limitText ); |
462 | 459 | if( $last != '' ) { |
463 | 460 | $nextLink = $sk->makeLinkObj( $title, $nextLink, |
464 | 461 | wfArrayToCGI( $query + array( 'from' => $last ) ) ); |