Redo WhatLinksHere query and add a *_from_namespace field to link tables
[lhc/web/wiklou.git] / includes / specials / SpecialMergeHistory.php
index a27cf4c..c9d3a66 100644 (file)
@@ -133,7 +133,7 @@ class SpecialMergeHistory extends SpecialPage {
                if ( !$this->mTargetObj instanceof Title ) {
                        $errors[] = $this->msg( 'mergehistory-invalid-source' )->parseAsBlock();
                } elseif ( !$this->mTargetObj->exists() ) {
-                       $errors[] = $this->msg( 'mergehistory-no-source', array( 'parse' ),
+                       $errors[] = $this->msg( 'mergehistory-no-source',
                                wfEscapeWikiText( $this->mTargetObj->getPrefixedText() )
                        )->parseAsBlock();
                }
@@ -141,7 +141,7 @@ class SpecialMergeHistory extends SpecialPage {
                if ( !$this->mDestObj instanceof Title ) {
                        $errors[] = $this->msg( 'mergehistory-invalid-destination' )->parseAsBlock();
                } elseif ( !$this->mDestObj->exists() ) {
-                       $errors[] = $this->msg( 'mergehistory-no-destination', array( 'parse' ),
+                       $errors[] = $this->msg( 'mergehistory-no-destination',
                                wfEscapeWikiText( $this->mDestObj->getPrefixedText() )
                        )->parseAsBlock();
                }
@@ -452,6 +452,7 @@ class SpecialMergeHistory extends SpecialPage {
                                $dbw->insert( 'pagelinks',
                                        array(
                                                'pl_from' => $this->mDestID,
+                                               'pf_from_namespace' => $destTitle->getNamespace(),
                                                'pl_namespace' => $destTitle->getNamespace(),
                                                'pl_title' => $destTitle->getDBkey() ),
                                        __METHOD__