Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F5460
bugfix_17536_recentchanges.diff
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 10:30 PM
2014-11-21 22:30:26 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
bugfix_17536_recentchanges.diff
View Options
Index: RecentChange.php
===================================================================
--- RecentChange.php (revision 47522)
+++ RecentChange.php (working copy)
@@ -478,6 +478,25 @@
'actionComment' => $actionComment, // the comment appended to the action, passed from LogPage
);
$rc->save();
+
+ #BUGFIX 17536: if the moved page is new update the rc log
+ if( $type == 'move')
+ {
+ $dbw = wfGetDB( DB_SLAVE );
+ #Load destination title
+ $p = LogPage::extractParams($params);
+ $nt = Title::newFromText( $p[0] );
+ #Check if the page is new
+ if( $rc_id = $dbw->selectField('recentchanges', array( 'rc_id' ), array("rc_cur_id" => $nt->getArticleID(), "rc_type" => RC_NEW) ) )
+ {
+ #Open a master connection for update rc table
+ $dbw = wfGetDB( DB_MASTER );
+ $dbw->begin();
+ #Update row
+ $dbw->update('recentchanges', array( 'rc_title' => $nt->getDBkey(), 'rc_namespace' => $nt->getNamespace()), array( 'rc_id' => $rc_id) );
+ $dbw->commit();
+ }
+ }
}
# Initialises the members of this object from a mysql row object
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5018
Default Alt Text
bugfix_17536_recentchanges.diff (1 KB)
Attached To
Mode
T19536: Move + delete removes an article from Special:NewPages
Attached
Detach File
Event Timeline
Log In to Comment