From d9ca1dbba57f89f7ce432fdbdc31124fc848cadb Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Wed, 1 Apr 2009 07:10:24 +0000 Subject: [PATCH] (bug 18291) rebuildrecentchanges.php failed to add deletion log entries --- RELEASE-NOTES | 1 + maintenance/rebuildrecentchanges.inc | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 198821d666..0dd723c7da 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -314,6 +314,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 18259) Special:DeletedContributions now also uses MediaWiki:Sp-contributions-logs for the link to Special:Log * Don't add empty title="" attributes to links to anchors on the current page +* (bug 18291) rebuildrecentchanges.php failed to add deletion log entries == API changes in 1.15 == * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions diff --git a/maintenance/rebuildrecentchanges.inc b/maintenance/rebuildrecentchanges.inc index f846d2b75b..31bc94aa54 100644 --- a/maintenance/rebuildrecentchanges.inc +++ b/maintenance/rebuildrecentchanges.inc @@ -142,7 +142,8 @@ function rebuildRecentChangesTablePass3() } $cutoff = time() - $wgRCMaxAge; - $dbw->insertSelect( 'recentchanges', array( 'logging', 'page', 'user' ), + list($logging, $page) = $dbw->tableNamesN( 'logging', 'page' ); + $dbw->insertSelect( 'recentchanges', array( 'user', "$logging LEFT JOIN $page ON (log_namespace=page_namespace AND log_title=page_title)" ), array( 'rc_timestamp' => 'log_timestamp', 'rc_cur_time' => 'log_timestamp', @@ -158,7 +159,7 @@ function rebuildRecentChangesTablePass3() 'rc_this_oldid' => 0, 'rc_last_oldid' => 0, 'rc_type' => RC_LOG, - 'rc_cur_id' => 'page_id', + 'rc_cur_id' => 'COALESCE(page_id, 0)', 'rc_log_type' => 'log_type', 'rc_log_action' => 'log_action', 'rc_logid' => 'log_id', @@ -167,8 +168,6 @@ function rebuildRecentChangesTablePass3() ), array( 'log_timestamp > ' . $dbw->addQuotes( $dbw->timestamp( $cutoff ) ), 'log_user=user_id', - 'log_namespace=page_namespace', - 'log_title=page_title', 'log_type IN(' . implode(',',$selectLogs) . ')' ), __METHOD__, array(), // INSERT options -- 2.20.1