r87405 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87404‎ | r87405 | r87406 >
Date:15:38, 4 May 2011
Author:demon
Status:resolved (Comments)
Tags:
Comment:
Same as r87404, in trunk. Fixes bug 28678: Special:WikiSets/0 explodes
Modified paths:
  • /trunk/extensions/CentralAuth/specials/SpecialWikiSets.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralAuth/specials/SpecialWikiSets.php
@@ -96,7 +96,14 @@
9797
9898 $wgOut->setSubtitle( wfMsgExt( 'centralauth-editset-subtitle', 'parseinline' ) );
9999
100 - $set = $subpage ? WikiSet::newFromID( $subpage ) : null;
 100+ $set = ( $subpage || $subpage === '0' ) ? WikiSet::newFromID( $subpage ) : null;
 101+ if( !$set ) {
 102+ $wgOut->setPageTitle( wfMsg( 'error' ) );
 103+ $error = wfMsgExt( 'centralauth-editset-notfound', array( 'escapenoentities' ), $subpage );
 104+ $this->buildMainView( "<strong class='error'>{$error}</strong>" );
 105+ return;
 106+ }
 107+
101108 if ( !$name ) $name = $set ? $set->getName() : '';
102109 if ( !$type ) $type = $set ? $set->getType() : WikiSet::OPTIN;
103110 if ( !$wikis ) $wikis = implode( "\n", $set ? $set->getWikisRaw() : array() );

Follow-up revisions

RevisionCommit summaryAuthorDate
r88215Properly fix bug 28678, by not allowing to enter the set creation page in...vasilievvv05:24, 16 May 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r87404Commit live hack for bug 28678demon15:37, 4 May 2011

Comments

#Comment by VasilievVV (talk | contribs)   05:25, 16 May 2011

Re-implemented in r88215.

Status & tagging log