Index: trunk/phase3/includes/Wiki.php |
— | — | @@ -249,7 +249,8 @@ |
250 | 250 | |
251 | 251 | // Namespace might change when using redirects |
252 | 252 | if( ( $action == 'view' || $action == 'render' ) && !$request->getVal( 'oldid' ) && |
253 | | - $request->getVal( 'redirect' ) != 'no' ) { |
| 253 | + $request->getVal( 'redirect' ) != 'no' && |
| 254 | + !( $wgTitle->getNamespace() == NS_IMAGE && wfFindFile( $wgTitle->getText() ) ) ) { |
254 | 255 | |
255 | 256 | $dbr = wfGetDB(DB_SLAVE); |
256 | 257 | $article->loadPageData($article->pageDataFromTitle($dbr, $title)); |