Index: trunk/extensions/CentralNotice/CentralNotice.php |
— | — | @@ -20,6 +20,7 @@ |
21 | 21 | 'commons', |
22 | 22 | 'meta', |
23 | 23 | 'wikispecies', |
| 24 | + 'test' |
24 | 25 | ); |
25 | 26 | |
26 | 27 | // Enable the notice-hosting infrastructure on this wiki... |
Index: trunk/extensions/CentralNotice/SpecialCentralNotice.php |
— | — | @@ -285,7 +285,7 @@ |
286 | 286 | * Show all campaigns found in the database, show "Add a campaign" form |
287 | 287 | */ |
288 | 288 | function listNotices() { |
289 | | - global $wgOut, $wgUser, $wgLang, $wgRequest; |
| 289 | + global $wgOut, $wgUser, $wgLang, $wgRequest, $wgNoticeProjects; |
290 | 290 | |
291 | 291 | // Get connection |
292 | 292 | $dbr = wfGetDB( DB_SLAVE ); |
— | — | @@ -362,8 +362,12 @@ |
363 | 363 | $projects = $this->getNoticeProjects( $row->not_name ); |
364 | 364 | $project_count = count( $projects ); |
365 | 365 | $projectList = ''; |
366 | | - if ( $project_count > 2 ) { |
367 | | - $projectList = wfMsg ( 'centralnotice-multiple', $project_count ); |
| 366 | + if ( $project_count > 1 ) { |
| 367 | + if ( $project_count == count( $wgNoticeProjects ) ) { |
| 368 | + $projectList = wfMsg ( 'centralnotice-all-projects' ); |
| 369 | + } else { |
| 370 | + $projectList = wfMsg ( 'centralnotice-multiple', $project_count ); |
| 371 | + } |
368 | 372 | } elseif ( $project_count > 0 ) { |
369 | 373 | $projectList = $wgLang->commaList( $projects ); |
370 | 374 | } |
Index: trunk/extensions/CentralNotice/CentralNotice.i18n.php |
— | — | @@ -34,7 +34,8 @@ |
35 | 35 | 'centralnotice-add-template' => 'Add a banner', |
36 | 36 | 'centralnotice-show-notices' => 'Show campaigns', |
37 | 37 | 'centralnotice-list-templates' => 'List banners', |
38 | | - 'centralnotice-multiple' => 'multiple ($1)', |
| 38 | + 'centralnotice-multiple' => 'Multiple ($1)', |
| 39 | + 'centralnotice-all-projects' => 'All projects', |
39 | 40 | 'centralnotice-language-listing' => '$1 - $2', |
40 | 41 | 'centralnotice-translations' => 'Translations', |
41 | 42 | 'centralnotice-translate-to' => 'Translate to', |