Index: trunk/extensions/CentralNotice/SpecialCentralNotice.php |
— | — | @@ -363,13 +363,20 @@ |
364 | 364 | $project_count = count( $projects ); |
365 | 365 | $projectList = ''; |
366 | 366 | if ( $project_count > 1 ) { |
367 | | - if ( $project_count == count( $wgNoticeProjects ) ) { |
| 367 | + $allProjects = true; |
| 368 | + foreach ( $wgNoticeProjects as $project ) { |
| 369 | + if ( !in_array( $project, $projects ) ) { |
| 370 | + $allProjects = false; |
| 371 | + break; |
| 372 | + } |
| 373 | + } |
| 374 | + if ( $allProjects ) { |
368 | 375 | $projectList = wfMsg ( 'centralnotice-all-projects' ); |
369 | 376 | } else { |
370 | 377 | $projectList = wfMsg ( 'centralnotice-multiple', $project_count ); |
371 | 378 | } |
372 | | - } elseif ( $project_count > 0 ) { |
373 | | - $projectList = $wgLang->commaList( $projects ); |
| 379 | + } elseif ( $project_count == 1 ) { |
| 380 | + $projectList = htmlspecialchars( $projects[0] ); |
374 | 381 | } |
375 | 382 | $fields[] = $projectList; |
376 | 383 | |