Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -118,6 +118,7 @@ |
119 | 119 | 'category_header', |
120 | 120 | 'subcategories', |
121 | 121 | 'category-media-header', |
| 122 | + 'category-empty', |
122 | 123 | ), |
123 | 124 | 'mainpage' => array( |
124 | 125 | 'linkprefix', |
Index: trunk/phase3/includes/CategoryPage.php |
— | — | @@ -90,6 +90,11 @@ |
91 | 91 | $this->getImageSection() . |
92 | 92 | $this->getCategoryBottom(); |
93 | 93 | |
| 94 | + // Give a proper message if category is empty |
| 95 | + if ( $r == '' ) { |
| 96 | + $r = wfMsgExt( 'category-empty', array( 'parse' ) ); |
| 97 | + } |
| 98 | + |
94 | 99 | wfProfileOut( __METHOD__ ); |
95 | 100 | return $r; |
96 | 101 | } |
— | — | @@ -229,13 +234,15 @@ |
230 | 235 | } |
231 | 236 | |
232 | 237 | function getCategoryTop() { |
233 | | - $r = "<br style=\"clear:both;\"/>\n"; |
| 238 | + $r = ''; |
234 | 239 | if( $this->until != '' ) { |
235 | 240 | $r .= $this->pagingLinks( $this->title, $this->nextPage, $this->until, $this->limit ); |
236 | 241 | } elseif( $this->nextPage != '' || $this->from != '' ) { |
237 | 242 | $r .= $this->pagingLinks( $this->title, $this->from, $this->nextPage, $this->limit ); |
238 | 243 | } |
239 | | - return $r; |
| 244 | + return $r == '' |
| 245 | + ? $r |
| 246 | + : "<br style=\"clear:both;\"/>\n" . $r; |
240 | 247 | } |
241 | 248 | |
242 | 249 | function getSubcategorySection() { |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -562,6 +562,7 @@ |
563 | 563 | 'category_header' => 'Articles in category "$1"', |
564 | 564 | 'subcategories' => 'Subcategories', |
565 | 565 | 'category-media-header' => 'Media in category "$1"', |
| 566 | +'category-empty' => "''This category contains currently no articles or media.''", |
566 | 567 | |
567 | 568 | 'linkprefix' => '/^(.*?)([a-zA-Z\x80-\xff]+)$/sD', # only translate this message to other languages if you have to change it |
568 | 569 | 'mainpagetext' => "<big>'''MediaWiki has been successfully installed.'''</big>", |
Index: trunk/phase3/languages/messages/MessagesDe.php |
— | — | @@ -253,6 +253,7 @@ |
254 | 254 | 'category_header' => 'Seiten in der Kategorie „$1“', |
255 | 255 | 'subcategories' => 'Unterkategorien', |
256 | 256 | 'category-media-header' => 'Medien in der Kategorie „$1“', |
| 257 | +'category-empty' => "''Diese Kategorie enthält zur Zeit keine Artikel oder Medien.''", |
257 | 258 | |
258 | 259 | 'mainpagetext' => 'MediaWiki wurde erfolgreich installiert.', |
259 | 260 | 'mainpagedocfooter' => 'Hilfe zur Benutzung und Konfiguration der Wiki Software finden Sie im [http://meta.wikimedia.org/wiki/Help:Contents Benutzerhandbuch]. |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -142,6 +142,7 @@ |
143 | 143 | compatibility |
144 | 144 | * Introduced 'ContributionsToolLinks' hook; see docs/hooks.txt for more |
145 | 145 | information |
| 146 | +* Add a message if category is empty |
146 | 147 | |
147 | 148 | == Bugfixes since 1.10 == |
148 | 149 | |