Merge "Followup I4049b666: "Removing prefix exception for HTMLCheckMatrix""
[lhc/web/wiklou.git] / includes / specials / SpecialMergeHistory.php
index eea1336..6efc12b 100644 (file)
@@ -159,14 +159,12 @@ class SpecialMergeHistory extends SpecialPage {
        }
 
        function showMergeForm() {
-               global $wgScript;
-
                $this->getOutput()->addWikiMsg( 'mergehistory-header' );
 
                $this->getOutput()->addHTML(
                        Xml::openElement( 'form', array(
                                'method' => 'get',
-                               'action' => $wgScript ) ) .
+                               'action' => wfScript() ) ) .
                                '<fieldset>' .
                                Xml::element( 'legend', array(),
                                        $this->msg( 'mergehistory-box' )->text() ) .
@@ -328,14 +326,14 @@ class SpecialMergeHistory extends SpecialPage {
        /**
         * Actually attempt the history move
         *
-        * @todo: if all versions of page A are moved to B and then a user
+        * @todo if all versions of page A are moved to B and then a user
         * tries to do a reverse-merge via the "unmerge" log link, then page
         * A will still be a redirect (as it was after the original merge),
         * though it will have the old revisions back from before (as expected).
         * The user may have to "undo" the redirect manually to finish the "unmerge".
         * Maybe this should delete redirects at the target page of merges?
         *
-        * @return boolean Success
+        * @return bool Success
         */
        function merge() {
                # Get the titles directly from the IDs, in case the target page params
@@ -452,6 +450,7 @@ class SpecialMergeHistory extends SpecialPage {
                                $dbw->insert( 'pagelinks',
                                        array(
                                                'pl_from' => $this->mDestID,
+                                               'pl_from_namespace' => $destTitle->getNamespace(),
                                                'pl_namespace' => $destTitle->getNamespace(),
                                                'pl_title' => $destTitle->getDBkey() ),
                                        __METHOD__
@@ -476,7 +475,7 @@ class SpecialMergeHistory extends SpecialPage {
                        array( $destTitle->getPrefixedText(), $timestampLimit ), $this->getUser()
                );
 
-               # @TODO: message should use redirect=no
+               # @todo message should use redirect=no
                $this->getOutput()->addWikiMsg( 'mergehistory-success',
                        $targetTitle->getPrefixedText(), $destTitle->getPrefixedText(), $count );