Index: trunk/extensions/CentralAuth/specials/SpecialWikiSets.php |
— | — | @@ -42,6 +42,7 @@ |
43 | 43 | $this->buildMainView(); |
44 | 44 | } |
45 | 45 | } else { |
| 46 | + $newPage = ( $subpage === '0' && $this->mCanEdit ); |
46 | 47 | if ( $subpage ) { |
47 | 48 | $set = is_numeric( $subpage ) ? WikiSet::newFromId( $subpage ) : WikiSet::newFromName( $subpage ); |
48 | 49 | if ( $set ) { |
— | — | @@ -54,9 +55,9 @@ |
55 | 56 | } |
56 | 57 | } |
57 | 58 | |
58 | | - if ( ( $subpage || $subpage === '0' ) && $this->mCanEdit && $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) ) ) { |
| 59 | + if ( ( $subpage || $newPage ) && $this->mCanEdit && $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) ) ) { |
59 | 60 | $this->doSubmit( $subpage ); |
60 | | - } else if ( ( $subpage || $subpage === '0' ) && is_numeric( $subpage ) ) { |
| 61 | + } else if ( ( $subpage || $newPage ) && is_numeric( $subpage ) ) { |
61 | 62 | $this->buildSetView( $subpage ); |
62 | 63 | } else { |
63 | 64 | $this->buildMainView(); |
— | — | @@ -97,12 +98,6 @@ |
98 | 99 | $wgOut->setSubtitle( wfMsgExt( 'centralauth-editset-subtitle', 'parseinline' ) ); |
99 | 100 | |
100 | 101 | $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 | 102 | |
108 | 103 | if ( !$name ) $name = $set ? $set->getName() : ''; |
109 | 104 | if ( !$type ) $type = $set ? $set->getType() : WikiSet::OPTIN; |