Index: branches/wmf/1.17wmf1/extensions/CentralAuth/SpecialWikiSets.php |
— | — | @@ -96,7 +96,14 @@ |
97 | 97 | |
98 | 98 | $wgOut->setSubtitle( wfMsgExt( 'centralauth-editset-subtitle', 'parseinline' ) ); |
99 | 99 | |
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 | + |
101 | 108 | if ( !$name ) $name = $set ? $set->getName() : ''; |
102 | 109 | if ( !$type ) $type = $set ? $set->getType() : WikiSet::OPTIN; |
103 | 110 | if ( !$wikis ) $wikis = implode( "\n", $set ? $set->getWikisRaw() : array() ); |