Index: trunk/extensions/AJAXPoll/AJAXPoll_body.php |
— | — | @@ -63,7 +63,7 @@ |
64 | 64 | */ |
65 | 65 | |
66 | 66 | $row = $dbw->selectRow( |
67 | | - array( 'poll_info' ), |
| 67 | + array( 'ajaxpoll_info' ), |
68 | 68 | array( 'COUNT(poll_id) AS count' ), |
69 | 69 | array( 'poll_id' => $id ), |
70 | 70 | __METHOD__ |
— | — | @@ -71,7 +71,7 @@ |
72 | 72 | |
73 | 73 | if( empty( $row->count ) ) { |
74 | 74 | $dbw->insert( |
75 | | - 'poll_info', |
| 75 | + 'ajaxpoll_info', |
76 | 76 | array( |
77 | 77 | 'poll_id' => $id, |
78 | 78 | 'poll_txt' => $input, |
— | — | @@ -99,7 +99,7 @@ |
100 | 100 | $dbr = wfGetDB( DB_SLAVE ); |
101 | 101 | |
102 | 102 | $res = $dbr->select( |
103 | | - 'poll_vote', |
| 103 | + 'ajaxpoll_vote', |
104 | 104 | array( |
105 | 105 | 'COUNT(*)', |
106 | 106 | 'COUNT(DISTINCT poll_id)', |
— | — | @@ -132,7 +132,7 @@ |
133 | 133 | $clockago = $x . ' ' . $y . ( $x > 1 ? 's' : '' ); |
134 | 134 | |
135 | 135 | $res = $dbr->select( |
136 | | - 'poll_vote', |
| 136 | + 'ajaxpoll_vote', |
137 | 137 | 'COUNT(*)', |
138 | 138 | array( 'DATE_SUB(CURDATE(), INTERVAL 2 DAY) <= poll_date' ), |
139 | 139 | __METHOD__ |
— | — | @@ -164,7 +164,7 @@ |
165 | 165 | $answer = ++$answer; |
166 | 166 | |
167 | 167 | $q = $dbw->select( |
168 | | - 'poll_vote', |
| 168 | + 'ajaxpoll_vote', |
169 | 169 | 'COUNT(*) AS count', |
170 | 170 | array( |
171 | 171 | 'poll_id' => $id, |
— | — | @@ -177,7 +177,7 @@ |
178 | 178 | if ( $row['count'] > 0 ) { |
179 | 179 | |
180 | 180 | $updateQuery = $dbw->update( |
181 | | - 'poll_vote', |
| 181 | + 'ajaxpoll_vote', |
182 | 182 | array( |
183 | 183 | 'poll_answer' => $answer, |
184 | 184 | 'poll_date' => wfTimestampNow() |
— | — | @@ -194,7 +194,7 @@ |
195 | 195 | } else { |
196 | 196 | |
197 | 197 | $insertQuery = $dbw->insert( |
198 | | - 'poll_vote', |
| 198 | + 'ajaxpoll_vote', |
199 | 199 | array( |
200 | 200 | 'poll_id' => $id, |
201 | 201 | 'poll_user' => $user, |
— | — | @@ -212,7 +212,7 @@ |
213 | 213 | } else { // revoking a vote |
214 | 214 | |
215 | 215 | $deleteQuery = $dbw->delete( |
216 | | - 'poll_vote', |
| 216 | + 'ajaxpoll_vote', |
217 | 217 | array( |
218 | 218 | 'poll_id' => $id, |
219 | 219 | 'poll_user' => $user, |
— | — | @@ -234,7 +234,7 @@ |
235 | 235 | $dbr = wfGetDB( DB_SLAVE ); |
236 | 236 | |
237 | 237 | $q = $dbr->select( |
238 | | - 'poll_info', |
| 238 | + 'ajaxpoll_info', |
239 | 239 | array( 'poll_txt', 'poll_date' ), |
240 | 240 | array( 'poll_id' => $id ), |
241 | 241 | __METHOD__ |
— | — | @@ -248,7 +248,7 @@ |
249 | 249 | $start_date = $row['poll_date']; |
250 | 250 | |
251 | 251 | $q = $dbr->select( |
252 | | - 'poll_vote', |
| 252 | + 'ajaxpoll_vote', |
253 | 253 | array( 'poll_answer', 'COUNT(*)' ), |
254 | 254 | array( 'poll_id' => $id ), |
255 | 255 | __METHOD__, |
— | — | @@ -265,7 +265,7 @@ |
266 | 266 | |
267 | 267 | // Did we vote? |
268 | 268 | $q = $dbr->select( |
269 | | - 'poll_vote', |
| 269 | + 'ajaxpoll_vote', |
270 | 270 | array( 'poll_answer', 'poll_date' ), |
271 | 271 | array( |
272 | 272 | 'poll_id' => $id, |