Index: trunk/phase3/includes/Article.php |
— | — | @@ -1199,7 +1199,7 @@ |
1200 | 1200 | * namespace, show the default message text. To be called from Article::view(). |
1201 | 1201 | */ |
1202 | 1202 | public function showMissingArticle() { |
1203 | | - global $wgOut, $wgRequest; |
| 1203 | + global $wgOut, $wgRequest, $wgUser; |
1204 | 1204 | # Show delete and move logs |
1205 | 1205 | $this->showLogs(); |
1206 | 1206 | |
— | — | @@ -1213,7 +1213,11 @@ |
1214 | 1214 | // Use the default message text |
1215 | 1215 | $text = $this->getContent(); |
1216 | 1216 | } else { |
1217 | | - if ( $this->mTitle->userCan( 'edit' ) ) |
| 1217 | + $createErrors = $this->mTitle->getUserPermissionsErrors( 'create', $wgUser ); |
| 1218 | + $editErrors = $this->mTitle->getUserPermissionsErrors( 'edit', $wgUser ); |
| 1219 | + $errors = array_merge( $createErrors, $editErrors ); |
| 1220 | + |
| 1221 | + if ( !count($errors) ) |
1218 | 1222 | $text = wfMsgNoTrans( 'noarticletext' ); |
1219 | 1223 | else |
1220 | 1224 | $text = wfMsgNoTrans( 'noarticletext-nopermission' ); |