r76462 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76461‎ | r76462 | r76463 >
Date:19:27, 10 November 2010
Author:kaldari
Status:ok
Tags:
Comment:
updates to r76356 and r76358
Modified paths:
  • /trunk/extensions/CentralNotice/SpecialCentralNotice.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/SpecialCentralNotice.php
@@ -363,13 +363,20 @@
364364 $project_count = count( $projects );
365365 $projectList = '';
366366 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 ) {
368375 $projectList = wfMsg ( 'centralnotice-all-projects' );
369376 } else {
370377 $projectList = wfMsg ( 'centralnotice-multiple', $project_count );
371378 }
372 - } elseif ( $project_count > 0 ) {
373 - $projectList = $wgLang->commaList( $projects );
 379+ } elseif ( $project_count == 1 ) {
 380+ $projectList = htmlspecialchars( $projects[0] );
374381 }
375382 $fields[] = $projectList;
376383

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r76356more work towards multi-project selection - bug 20229kaldari23:57, 8 November 2010
r76358more work towards multi-project selection - bug 20229kaldari00:08, 9 November 2010

Status & tagging log