Index: trunk/extensions/ProofreadPage/ProofreadPage_body.php |
— | — | @@ -311,22 +311,23 @@ |
312 | 312 | } |
313 | 313 | $out->proofreadPageDone = true; |
314 | 314 | |
315 | | - switch( $wgTitle->getNamespace() ) { |
316 | | - case $this->page_namespace: |
317 | | - if ( preg_match( "/^{$this->page_namespace}:(.*?)(\/([0-9]*)|)$/", $wgTitle->getPrefixedText(), $m ) ) { |
318 | | - $this->preparePage( $out, $m, $isEdit ); |
319 | | - return true; |
320 | | - } |
321 | | - break; |
322 | | - case $this->index_namespace: |
323 | | - $this->prepareIndex( $out ); |
324 | | - break; |
325 | | - case NS_MAIN: |
326 | | - $this->prepareArticle( $out ); |
327 | | - break; |
| 315 | + $page_namespace = $this->page_namespace; |
| 316 | + if ( preg_match( "/^$page_namespace:(.*?)(\/([0-9]*)|)$/", $wgTitle->getPrefixedText(), $m ) ) { |
| 317 | + $this->preparePage( $out, $m, $isEdit ); |
| 318 | + return true; |
328 | 319 | } |
329 | | - return true; |
330 | 320 | |
| 321 | + $index_namespace = $this->index_namespace; |
| 322 | + if ( $isEdit && ( preg_match( "/^$index_namespace:(.*?)(\/([0-9]*)|)$/", $wgTitle->getPrefixedText(), $m ) ) ) { |
| 323 | + $this->prepareIndex( $out ); |
| 324 | + return true; |
| 325 | + } |
| 326 | + |
| 327 | + if( $wgTitle->getNamespace() == NS_MAIN ) { |
| 328 | + $this->prepareArticle( $out ); |
| 329 | + return true; |
| 330 | + } |
| 331 | + |
331 | 332 | return true; |
332 | 333 | } |
333 | 334 | |