Fix for #883774 inverse_timestamp not updated when overwriting an old redirect on...
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 4 Mar 2004 08:26:17 +0000 (08:26 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 4 Mar 2004 08:26:17 +0000 (08:26 +0000)
includes/SpecialMovepage.php

index 3a0b32d..9fc0dd6 100644 (file)
@@ -312,6 +312,7 @@ class MovePageForm {
 
                # Change the name of the target page:
         $now = wfTimestampNow();
+        $won = wfInvertTimestamp( $now );
                $sql = "UPDATE cur SET cur_touched='{$now}'," .
                  "cur_namespace={$this->nns},cur_title='{$this->ndt}' " .
                  "WHERE cur_id={$this->oldid}";
@@ -320,7 +321,7 @@ class MovePageForm {
 
                # Repurpose the old redirect. We don't save it to history since
                # by definition if we've got here it's rather uninteresting.
-               $sql = "UPDATE cur SET cur_touched='{$now}',cur_timestamp='{$now}'," .
+               $sql = "UPDATE cur SET cur_touched='{$now}',cur_timestamp='{$now}',inverse_timestamp='${won}'," .
                  "cur_namespace={$this->ons},cur_title='{$this->odt}'," .
                  "cur_text='#REDIRECT [[{$this->nft}]]\n',cur_comment='" .
                  "{$mt} \\\"{$this->nft}\\\"',cur_user='" .  $wgUser->getID() .