Revert more minor breakage from missing HTML escaping (broken June 24)
[lhc/web/wiklou.git] / index.php
index 3ad6f78..c9b09ad 100644 (file)
--- a/index.php
+++ b/index.php
@@ -145,13 +145,12 @@ if( !$wgDisableInternalSearch && !is_null( $search ) && $search !== '' ) {
        $ns = $wgTitle->getNamespace();
 
        // Namespace might change when using redirects
-       if($action == 'view') {
+       if($action == 'view' && !$wgRequest->getVal( 'oldid' ) ) {
                $wgArticle = new Article( $wgTitle );
                $rTitle = Title::newFromRedirect( $wgArticle->fetchContent() );
                if($rTitle) {
-                       if( $rTitle->getNamespace() == $ns ) {
-                               $wgArticle->mContentLoaded=false;
-                       }
+                       # Reload from the page pointed to later
+                       $wgArticle->mContentLoaded = false;
                        $ns = $rTitle->getNamespace();
                }
        }