Index: trunk/extensions/Wikidata/OmegaWiki/Wikidata.php |
— | — | @@ -141,17 +141,21 @@ |
142 | 142 | * @return true if permission to edit, false if not |
143 | 143 | **/ |
144 | 144 | public function edit() { |
145 | | - global |
146 | | - $wgOut, $wgRequest, $wgUser; |
147 | | - |
| 145 | + global $wgOut, $wgRequest, $wgUser; |
| 146 | + |
148 | 147 | $wgOut->enableClientCache( false ); |
149 | 148 | |
| 149 | + if ( $wgUser->isBlockedFrom( $this->getTitle(), false ) ) { |
| 150 | + $wgOut->blockedPage() ; |
| 151 | + return false; |
| 152 | + } |
| 153 | + |
150 | 154 | $dc = wdGetDataSetContext(); |
151 | | - if ( !$wgUser->isAllowed( 'editwikidata-' . $dc ) ) { |
152 | | - $wgOut->addWikiText( wfMsgSc( "noedit", $dc->fetchName() ) ); |
| 155 | + if ( !$wgUser->isAllowed( 'editwikidata-' . $dc ) ) { |
| 156 | + $wgOut->addWikiText( wfMsgSc( "noedit", $dc->fetchName() ) ); |
153 | 157 | $wgOut->setPageTitle( wfMsgSc( "noedit_title" ) ); |
154 | | - return false; |
155 | | - } |
| 158 | + return false; |
| 159 | + } |
156 | 160 | |
157 | 161 | if ( $wgRequest->getText( 'save' ) != '' ) |
158 | 162 | $this->saveWithinTransaction(); |