Page MenuHomePhabricator

killNPonMove.patch

Authored By
bzimport
Nov 21 2014, 10:27 PM
Size
907 B
Referenced Files
None
Subscribers
None

killNPonMove.patch

Index: includes/Title.php
===================================================================
--- includes/Title.php (revision 84167)
+++ includes/Title.php (working copy)
@@ -3238,6 +3238,9 @@
$oldid = $this->getArticleID();
$latest = $this->getLatestRevID();
+ $oldns = $this->getNamespace();
+ $olddbk = $this->getDBkey();
+
$dbw = wfGetDB( DB_MASTER );
if ( $moveOverRedirect ) {
@@ -3322,6 +3325,17 @@
__METHOD__ );
$redirectSuppressed = false;
} else {
+ // Get rid of old new page entries in Special:NewPages and RC.
+ // Needs to be before $this->resetArticleUD( 0 ).
+ $dbw->delete( 'recentchanges', array(
+ 'rc_timestamp' => $dbw->timestamp( $this->getEarliestRevTime() ),
+ 'rc_namespace' => $oldns,
+ 'rc_title' => $olddbk,
+ 'rc_new' => 1
+ ),
+ __METHOD__
+ );
+
$this->resetArticleID( 0 );
$redirectSuppressed = true;
}

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4923
Default Alt Text
killNPonMove.patch (907 B)

Event Timeline