r110006 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110005‎ | r110006 | r110007 >
Date:16:06, 25 January 2012
Author:gregchiasson
Status:ok
Tags:
Comment:
AFT5 - pass the revision subselect through tablename, which should prepend with the table prefix.
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php
@@ -158,7 +158,7 @@
159159 'af_user_ip', 'af_hide_count', 'af_abuse_count',
160160 'af_helpful_count', 'af_unhelpful_count',
161161 'af_delete_count', 'af_needs_oversight',
162 - '(SELECT COUNT(*) FROM revision WHERE rev_id > af_revision_id AND rev_page = '.( integer ) $pageId.') AS age',
 162+ '(SELECT COUNT(*) FROM '.$dbr->tableName( 'revision' ).' WHERE rev_id > af_revision_id AND rev_page = '.( integer ) $pageId.') AS age',
163163 'CONVERT(af_helpful_count, SIGNED) - CONVERT(af_unhelpful_count, SIGNED) AS net_helpfulness',
164164 'page_latest', 'af_revision_id', 'page_title'
165165 ),

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r109565AFT5 feedback page - allow sorting by helpfulness, and add unhelpful flag, pe...gregchiasson20:49, 19 January 2012

Status & tagging log