r87404 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87403‎ | r87404 | r87405 >
Date:15:37, 4 May 2011
Author:demon
Status:reverted (Comments)
Tags:
Comment:
Commit live hack for bug 28678
Modified paths:
  • /branches/wmf/1.17wmf1/extensions/CentralAuth/SpecialWikiSets.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/extensions/CentralAuth/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
r87405Same as r87404, in trunk. Fixes bug 28678: Special:WikiSets/0 explodesdemon15:38, 4 May 2011
r88215Properly fix bug 28678, by not allowing to enter the set creation page in...vasilievvv05:24, 16 May 2011

Comments

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

That is completely wrong, because Special:WikiSets/0 is a link to add a new entry.

#Comment by P858snake (talk | contribs)   05:42, 16 May 2011

why is /0 a link to add a new entry... seems illogical?

#Comment by VasilievVV (talk | contribs)   12:42, 16 May 2011

Maybe. But it happened to be so.

#Comment by 😂 (talk | contribs)   19:55, 25 May 2011

Was superseded by followup.

Status & tagging log