r113839 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113838‎ | r113839 | r113840 >
Date:20:28, 14 March 2012
Author:wikinaut
Status:new
Tags:
Comment:
follow up r113837 oops, i forgot to make the corresponding database changes in the code
Modified paths:
  • /trunk/extensions/AJAXPoll/AJAXPoll_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/AJAXPoll/AJAXPoll_body.php
@@ -63,7 +63,7 @@
6464 */
6565
6666 $row = $dbw->selectRow(
67 - array( 'poll_info' ),
 67+ array( 'ajaxpoll_info' ),
6868 array( 'COUNT(poll_id) AS count' ),
6969 array( 'poll_id' => $id ),
7070 __METHOD__
@@ -71,7 +71,7 @@
7272
7373 if( empty( $row->count ) ) {
7474 $dbw->insert(
75 - 'poll_info',
 75+ 'ajaxpoll_info',
7676 array(
7777 'poll_id' => $id,
7878 'poll_txt' => $input,
@@ -99,7 +99,7 @@
100100 $dbr = wfGetDB( DB_SLAVE );
101101
102102 $res = $dbr->select(
103 - 'poll_vote',
 103+ 'ajaxpoll_vote',
104104 array(
105105 'COUNT(*)',
106106 'COUNT(DISTINCT poll_id)',
@@ -132,7 +132,7 @@
133133 $clockago = $x . ' ' . $y . ( $x > 1 ? 's' : '' );
134134
135135 $res = $dbr->select(
136 - 'poll_vote',
 136+ 'ajaxpoll_vote',
137137 'COUNT(*)',
138138 array( 'DATE_SUB(CURDATE(), INTERVAL 2 DAY) <= poll_date' ),
139139 __METHOD__
@@ -164,7 +164,7 @@
165165 $answer = ++$answer;
166166
167167 $q = $dbw->select(
168 - 'poll_vote',
 168+ 'ajaxpoll_vote',
169169 'COUNT(*) AS count',
170170 array(
171171 'poll_id' => $id,
@@ -177,7 +177,7 @@
178178 if ( $row['count'] > 0 ) {
179179
180180 $updateQuery = $dbw->update(
181 - 'poll_vote',
 181+ 'ajaxpoll_vote',
182182 array(
183183 'poll_answer' => $answer,
184184 'poll_date' => wfTimestampNow()
@@ -194,7 +194,7 @@
195195 } else {
196196
197197 $insertQuery = $dbw->insert(
198 - 'poll_vote',
 198+ 'ajaxpoll_vote',
199199 array(
200200 'poll_id' => $id,
201201 'poll_user' => $user,
@@ -212,7 +212,7 @@
213213 } else { // revoking a vote
214214
215215 $deleteQuery = $dbw->delete(
216 - 'poll_vote',
 216+ 'ajaxpoll_vote',
217217 array(
218218 'poll_id' => $id,
219219 'poll_user' => $user,
@@ -234,7 +234,7 @@
235235 $dbr = wfGetDB( DB_SLAVE );
236236
237237 $q = $dbr->select(
238 - 'poll_info',
 238+ 'ajaxpoll_info',
239239 array( 'poll_txt', 'poll_date' ),
240240 array( 'poll_id' => $id ),
241241 __METHOD__
@@ -248,7 +248,7 @@
249249 $start_date = $row['poll_date'];
250250
251251 $q = $dbr->select(
252 - 'poll_vote',
 252+ 'ajaxpoll_vote',
253253 array( 'poll_answer', 'COUNT(*)' ),
254254 array( 'poll_id' => $id ),
255255 __METHOD__,
@@ -265,7 +265,7 @@
266266
267267 // Did we vote?
268268 $q = $dbr->select(
269 - 'poll_vote',
 269+ 'ajaxpoll_vote',
270270 array( 'poll_answer', 'poll_date' ),
271271 array(
272272 'poll_id' => $id,

Follow-up revisions

RevisionCommit summaryAuthorDate
r113863follow up r113839 fixes the initial database creation problem. relies on r113...wikinaut21:43, 14 March 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r113837version 1.72 -- schema change. database rename . dropping an unused table fie...wikinaut20:19, 14 March 2012

Status & tagging log