r103469 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103468‎ | r103469 | r103470 >
Date:15:28, 17 November 2011
Author:rsterbin
Status:deferred
Tags:
Comment:
Quick bug fix: rollup tables were breaking for new pages with no feedback
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/api/ApiArticleFeedbackv5.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/api/ApiArticleFeedbackv5.php
@@ -215,6 +215,10 @@
216216 $page_data[$row->aa_field_id][$page_prefix.'count'] += $row->submits;
217217 }
218218
 219+ if ( count( $page_data ) < 1 ) {
 220+ return;
 221+ }
 222+
219223 $dbw->begin();
220224 $dbw->delete( $rev_table, array(
221225 $rev_prefix . 'page_id' => $pageId,
@@ -241,7 +245,7 @@
242246 global $wgUser;
243247 $dbw = wfGetDB( DB_MASTER );
244248 $revId = $params['revid'];
245 - $bucket = $params['revid'];
 249+ $bucket = $params['bucket'];
246250 $token = ApiArticleFeedbackv5Utils::getAnonToken( $params );
247251 $timestamp = $dbw->timestamp();
248252

Status & tagging log