Index: trunk/extensions/ArticleFeedbackv5/api/ApiFlagFeedbackArticleFeedbackv5.php |
— | — | @@ -42,70 +42,70 @@ |
43 | 43 | if ( !$record->af_id ) { |
44 | 44 | // no-op, because this is already broken |
45 | 45 | $error = 'articlefeedbackv5-invalid-feedback-id'; |
46 | | - } elseif( $params['flagtype'] == 'unhide' ) { |
| 46 | + } elseif ( $params['flagtype'] == 'unhide' ) { |
47 | 47 | // remove the hidden status |
48 | 48 | $update[] = 'af_hide_count = 0'; |
49 | | - } elseif( $params['flagtype'] == 'unoversight' ) { |
50 | | - // remove the oversight flag |
| 49 | + } elseif ( $params['flagtype'] == 'unoversight' ) { |
| 50 | + // remove the oversight flag |
51 | 51 | $update[] = 'af_needs_oversight = FALSE'; |
52 | | - } elseif( $params['flagtype'] == 'undelete' ) { |
| 52 | + } elseif ( $params['flagtype'] == 'undelete' ) { |
53 | 53 | // remove the deleted status, and clear oversight flag |
54 | 54 | $update[] = 'af_delete_count = 0'; |
55 | 55 | $update[] = 'af_needs_oversight = FALSE'; |
56 | | - } elseif( $params['flagtype'] == 'oversight' ) { |
| 56 | + } elseif ( $params['flagtype'] == 'oversight' ) { |
57 | 57 | // flag for oversight |
58 | 58 | $update[] = 'af_needs_oversight = TRUE'; |
59 | | - } elseif( in_array( $params['flagtype'], $flags ) ) { |
| 59 | + } elseif ( in_array( $params['flagtype'], $flags ) ) { |
60 | 60 | // Probably this doesn't need validation, since the API |
61 | 61 | // will handle it, but if it's getting interpolated into |
62 | 62 | // the SQL, I'm really wary not re-validating it. |
63 | | - $field = 'af_'.$params['flagtype'].'_count'; |
| 63 | + $field = 'af_' . $params['flagtype'] . '_count'; |
64 | 64 | $update[] = "$field = $field + 1"; |
65 | 65 | } else { |
66 | 66 | $error = 'articlefeedbackv5-invalid-feedback-flag'; |
67 | 67 | } |
68 | 68 | |
69 | 69 | // Newly abusive record |
70 | | - if( $flag == 'abuse' && $record->af_abuse_count == 0 ) { |
| 70 | + if ( $flag == 'abuse' && $record->af_abuse_count == 0 ) { |
71 | 71 | $counts['increment'][] = 'abusive'; |
72 | 72 | } |
73 | 73 | |
74 | | - if( $flag == 'oversight' ) { |
| 74 | + if ( $flag == 'oversight' ) { |
75 | 75 | $counts['increment'][] = 'needsoversight'; |
76 | 76 | } |
77 | | - if( $flag == 'unoversight' ) { |
| 77 | + if ( $flag == 'unoversight' ) { |
78 | 78 | $counts['decrement'][] = 'needsoversight'; |
79 | 79 | } |
80 | 80 | |
81 | 81 | |
82 | 82 | // Newly hidden record |
83 | | - if( $flag == 'hide' && $record->af_hide_count == 0 ) { |
| 83 | + if ( $flag == 'hide' && $record->af_hide_count == 0 ) { |
84 | 84 | $counts['increment'][] = 'invisible'; |
85 | 85 | $counts['decrement'][] = 'visible'; |
86 | 86 | } |
87 | 87 | // Unhidden record |
88 | | - if( $flag == 'unhide') { |
| 88 | + if ( $flag == 'unhide' ) { |
89 | 89 | $counts['increment'][] = 'visible'; |
90 | 90 | $counts['decrement'][] = 'invisible'; |
91 | 91 | } |
92 | 92 | |
93 | 93 | // Newly deleted record |
94 | | - if( $flag == 'delete' && $record->af_delete_count == 0 ) { |
| 94 | + if ( $flag == 'delete' && $record->af_delete_count == 0 ) { |
95 | 95 | $counts['increment'][] = 'deleted'; |
96 | 96 | $counts['decrement'][] = 'visible'; |
97 | 97 | } |
98 | 98 | // Undeleted record |
99 | | - if( $flag == 'undelete' ) { |
| 99 | + if ( $flag == 'undelete' ) { |
100 | 100 | $counts['increment'][] = 'visible'; |
101 | 101 | $counts['decrement'][] = 'deleted'; |
102 | 102 | } |
103 | | - |
| 103 | + |
104 | 104 | // Newly helpful record |
105 | | - if( $flag == 'helpful' && $record->af_helpful_count == 0 ) { |
| 105 | + if ( $flag == 'helpful' && $record->af_helpful_count == 0 ) { |
106 | 106 | $counts['increment'][] = 'helpful'; |
107 | 107 | } |
108 | 108 | // Newly unhelpful record (IE, unhelpful has overtaken helpful) |
109 | | - if( $flag == 'unhelpful' |
| 109 | + if ( $flag == 'unhelpful' |
110 | 110 | && ( ( $record->af_helpful_count - $record->af_unhelpful_count ) == 1 ) ) { |
111 | 111 | $counts['decrement'][] = 'helpful'; |
112 | 112 | } |
— | — | @@ -121,15 +121,15 @@ |
122 | 122 | |
123 | 123 | ApiArticleFeedbackv5Utils::incrementFilterCounts( $pageId, $counts['increment'] ); |
124 | 124 | ApiArticleFeedbackv5Utils::decrementFilterCounts( $pageId, $counts['decrement'] ); |
125 | | - |
126 | | - // This gets a potentially stale copy from the read |
| 125 | + |
| 126 | + // This gets a potentially stale copy from the read |
127 | 127 | // database assumes it's valid, in the interest |
128 | 128 | // of staying off of the write database. |
129 | | - // Better stale data than wail on the master, IMO, |
| 129 | + // Better stale data than wail on the master, IMO, |
130 | 130 | // but I'm open to suggestion on that one. |
131 | 131 | |
132 | 132 | // Update helpful/unhelpful count after submission |
133 | | - if( $params['flagtype'] == 'helpful' || $params['flagtype'] == 'unhelpful' ) { |
| 133 | + if ( $params['flagtype'] == 'helpful' || $params['flagtype'] == 'unhelpful' ) { |
134 | 134 | $record = $dbr->selectRow( |
135 | 135 | 'aft_article_feedback', |
136 | 136 | array( 'af_helpful_count', 'af_unhelpful_count' ), |
— | — | @@ -140,7 +140,7 @@ |
141 | 141 | $helpful = $record->af_helpful_count; |
142 | 142 | $unhelpful = $record->af_unhelpful_count; |
143 | 143 | |
144 | | - $helpful = wfMessage( 'articlefeedbackv5-form-helpful-votes', |
| 144 | + $helpful = wfMessage( 'articlefeedbackv5-form-helpful-votes', |
145 | 145 | ( $helpful + $unhelpful ), |
146 | 146 | $helpful, $unhelpful |
147 | 147 | )->escaped(); |
— | — | @@ -160,7 +160,7 @@ |
161 | 161 | 'reason' => $reason, |
162 | 162 | ); |
163 | 163 | |
164 | | - if( $helpful ) { |
| 164 | + if ( $helpful ) { |
165 | 165 | $results['helpful'] = $helpful; |
166 | 166 | } |
167 | 167 | |
Index: trunk/extensions/ArticleFeedbackv5/api/ApiArticleFeedbackv5.php |
— | — | @@ -34,7 +34,7 @@ |
35 | 35 | $params = $this->extractRequestParams(); |
36 | 36 | |
37 | 37 | // Blocked users are, well, blocked. |
38 | | - if( $wgUser->isBlocked() ) { |
| 38 | + if ( $wgUser->isBlocked() ) { |
39 | 39 | $this->getResult()->addValue( null, 'error', 'articlefeedbackv5-error-blocked' ); |
40 | 40 | return; |
41 | 41 | } |
— | — | @@ -268,15 +268,15 @@ |
269 | 269 | |
270 | 270 | # Does this record have a comment attached? |
271 | 271 | # Defined as an answer of type 'text'. |
272 | | - foreach( $answers as $a ) { |
273 | | - if( $a['aa_response_text'] !== null ) { |
| 272 | + foreach ( $answers as $a ) { |
| 273 | + if ( $a['aa_response_text'] !== null ) { |
274 | 274 | $has_comment = true; |
275 | 275 | } |
276 | 276 | } |
277 | 277 | |
278 | 278 | $filters = array( 'all', 'visible' ); |
279 | 279 | # If the feedbackrecord had a comment, update that filter count. |
280 | | - if( $has_comment ) { |
| 280 | + if ( $has_comment ) { |
281 | 281 | $filters[] = 'comment'; |
282 | 282 | } |
283 | 283 | |
Index: trunk/extensions/ArticleFeedbackv5/api/ApiViewFeedbackArticleFeedbackv5.php |
— | — | @@ -98,12 +98,12 @@ |
99 | 99 | # $sortField = 'rating'; |
100 | 100 | # break; |
101 | 101 | case 'age': |
102 | | - # Default field, fall through |
| 102 | + # Default field, fall through |
103 | 103 | default: |
104 | 104 | $sortField = 'af_id'; |
105 | 105 | $continueSql = "$sortField $continueDirection"; |
106 | 106 | break; |
107 | | - } |
| 107 | + } |
108 | 108 | $order = "$sortField $direction"; |
109 | 109 | |
110 | 110 | $where['af_page_id'] = $pageId; |
— | — | @@ -111,7 +111,7 @@ |
112 | 112 | # This join is needed for the comment filter. |
113 | 113 | $where[] = 'af_id = aa_feedback_id'; |
114 | 114 | |
115 | | - if( $continue !== null ) { |
| 115 | + if ( $continue !== null ) { |
116 | 116 | $where[] = "$continueSql $continue"; |
117 | 117 | } |
118 | 118 | |
— | — | @@ -122,14 +122,14 @@ |
123 | 123 | sure we get all answers for the exact IDs we want. */ |
124 | 124 | $id_query = $dbr->select( |
125 | 125 | array( |
126 | | - 'aft_article_feedback', |
| 126 | + 'aft_article_feedback', |
127 | 127 | 'aft_article_answer' |
128 | 128 | ), |
129 | 129 | array( |
130 | | - 'DISTINCT af_id', |
| 130 | + 'DISTINCT af_id', |
131 | 131 | 'CONVERT(af_helpful_count, SIGNED) - CONVERT(af_unhelpful_count, SIGNED) AS net_helpfulness' |
132 | 132 | ), |
133 | | - $where, |
| 133 | + $where, |
134 | 134 | __METHOD__, |
135 | 135 | array( |
136 | 136 | 'LIMIT' => $limit, |
— | — | @@ -156,9 +156,9 @@ |
157 | 157 | 'aa_response_rating', 'aa_response_option_id', |
158 | 158 | 'afi_data_type', 'af_created', 'user_name', |
159 | 159 | 'af_user_ip', 'af_hide_count', 'af_abuse_count', |
160 | | - 'af_helpful_count', 'af_unhelpful_count', |
| 160 | + 'af_helpful_count', 'af_unhelpful_count', |
161 | 161 | 'af_delete_count', 'af_needs_oversight', |
162 | | - '(SELECT COUNT(*) FROM '.$dbr->tableName( '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', |
163 | 163 | 'CONVERT(af_helpful_count, SIGNED) - CONVERT(af_unhelpful_count, SIGNED) AS net_helpfulness', |
164 | 164 | 'page_latest', 'af_revision_id', 'page_title' |
165 | 165 | ), |
— | — | @@ -202,23 +202,23 @@ |
203 | 203 | $where = array(); |
204 | 204 | |
205 | 205 | // Permissions check: these filters are for admins only. |
206 | | - if( |
207 | | - ( $filter == 'invisible' |
| 206 | + if ( |
| 207 | + ( $filter == 'invisible' |
208 | 208 | && !$wgUser->isAllowed( 'aftv5-see-hidden-feedback' ) ) |
209 | | - || |
210 | | - ( $filter == 'deleted' |
| 209 | + || |
| 210 | + ( $filter == 'deleted' |
211 | 211 | && !$wgUser->isAllowed( 'aftv5-see-deleted-feedback' ) ) |
212 | 212 | ) { |
213 | 213 | $filter = null; |
214 | 214 | } |
215 | 215 | |
216 | 216 | // Don't let non-allowed users see these. |
217 | | - if( !$wgUser->isAllowed( 'aftv5-see-hidden-feedback' ) ) { |
| 217 | + if ( !$wgUser->isAllowed( 'aftv5-see-hidden-feedback' ) ) { |
218 | 218 | $where['af_hide_count'] = 0; |
219 | 219 | } |
220 | 220 | |
221 | 221 | // Don't let non-allowed users see these. |
222 | | - if( !$wgUser->isAllowed( 'aftv5-see-deleted-feedback' ) ) { |
| 222 | + if ( !$wgUser->isAllowed( 'aftv5-see-deleted-feedback' ) ) { |
223 | 223 | $where['af_delete_count'] = 0; |
224 | 224 | } |
225 | 225 | |
— | — | @@ -247,7 +247,7 @@ |
248 | 248 | case 'invisible': |
249 | 249 | $where[] = 'af_hide_count > 0'; |
250 | 250 | break; |
251 | | - case 'abusive': |
| 251 | + case 'abusive': |
252 | 252 | $where[] = 'af_abuse_count > 0'; |
253 | 253 | break; |
254 | 254 | case 'helpful': |
— | — | @@ -294,10 +294,10 @@ |
295 | 295 | ) ) |
296 | 296 | . Html::openElement( 'div', array( |
297 | 297 | 'class' => 'articleFeedbackv5-comment-details-date' |
298 | | - ) ) |
299 | | - .Html::element( 'a', array( |
| 298 | + ) ) |
| 299 | + . Html::element( 'a', array( |
300 | 300 | 'href' => "#id=$id" |
301 | | - ), date( 'M j, Y H:i', strtotime($record[0]->af_created) ) ) |
| 301 | + ), date( 'M j, Y H:i', strtotime( $record[0]->af_created ) ) ) |
302 | 302 | . Html::closeElement( 'div' ) |
303 | 303 | # Remove for now, pending feedback. |
304 | 304 | # . Html::openElement( 'div', array( |
— | — | @@ -310,10 +310,10 @@ |
311 | 311 | |
312 | 312 | . Html::openElement( 'div', array( |
313 | 313 | 'class' => 'articleFeedbackv5-comment-details-updates' |
314 | | - ) ) |
| 314 | + ) ) |
315 | 315 | . Linker::link( |
316 | 316 | Title::newFromText( $record[0]->page_title ), |
317 | | - wfMessage( 'articlefeedbackv5-updates-since', $record[0]->age ), |
| 317 | + wfMessage( 'articlefeedbackv5-updates-since', $record[0]->age ), |
318 | 318 | array(), |
319 | 319 | array( |
320 | 320 | 'action' => 'historysubmit', |
— | — | @@ -330,7 +330,7 @@ |
331 | 331 | ) ) |
332 | 332 | . Html::openElement( 'p', array( 'class' => 'articleFeedbackv5-comment-foot' ) ); |
333 | 333 | |
334 | | - if( $can_vote ) { |
| 334 | + if ( $can_vote ) { |
335 | 335 | $footer_links .= Html::element( 'span', array( |
336 | 336 | 'class' => 'articleFeedbackv5-helpful-caption' |
337 | 337 | ), wfMessage( 'articlefeedbackv5-form-helpful-label', ( $record[0]->af_helpful_count + $record[0]->af_unhelpful_count ) ) ) |
— | — | @@ -338,7 +338,7 @@ |
339 | 339 | 'id' => "articleFeedbackv5-helpful-link-$id", |
340 | 340 | 'class' => 'articleFeedbackv5-helpful-link' |
341 | 341 | ), wfMessage( 'articlefeedbackv5-form-helpful-yes-label', $record[0]->af_helpful_count )->text() ) |
342 | | - .Html::element( 'a', array( |
| 342 | + . Html::element( 'a', array( |
343 | 343 | 'id' => "articleFeedbackv5-unhelpful-link-$id", |
344 | 344 | 'class' => 'articleFeedbackv5-unhelpful-link' |
345 | 345 | ), wfMessage( 'articlefeedbackv5-form-helpful-no-label', $record[0]->af_unhelpful_count )->text() ); |
— | — | @@ -347,7 +347,7 @@ |
348 | 348 | 'class' => 'articleFeedbackv5-helpful-votes', |
349 | 349 | 'id' => "articleFeedbackv5-helpful-votes-$id" |
350 | 350 | ), wfMessage( 'articlefeedbackv5-form-helpful-votes', ( $record[0]->af_helpful_count + $record[0]->af_unhelpful_count ), $record[0]->af_helpful_count, $record[0]->af_unhelpful_count ) ); |
351 | | - if( $can_flag ) { |
| 351 | + if ( $can_flag ) { |
352 | 352 | $footer_links .= Html::element( 'a', array( |
353 | 353 | 'id' => "articleFeedbackv5-abuse-link-$id", |
354 | 354 | 'class' => 'articleFeedbackv5-abuse-link' |
— | — | @@ -369,22 +369,22 @@ |
370 | 370 | |
371 | 371 | // Don't render the toolbox if they can't do anything with it. |
372 | 372 | $tools = null; |
373 | | - if( $can_hide || $can_delete ) { |
374 | | - $tools = Html::openElement( 'div', array( |
| 373 | + if ( $can_hide || $can_delete ) { |
| 374 | + $tools = Html::openElement( 'div', array( |
375 | 375 | 'class' => 'articleFeedbackv5-feedback-tools', |
376 | | - 'id' => 'articleFeedbackv5-feedback-tools-'.$id |
| 376 | + 'id' => 'articleFeedbackv5-feedback-tools-' . $id |
377 | 377 | ) ) |
378 | 378 | . Html::element( 'h3', array( |
379 | | - 'id' => 'articleFeedbackv5-feedback-tools-header-'.$id |
| 379 | + 'id' => 'articleFeedbackv5-feedback-tools-header-' . $id |
380 | 380 | ), wfMessage( 'articlefeedbackv5-form-tools-label' )->text() ) |
381 | 381 | . Html::openElement( 'ul', array( |
382 | | - 'id' => 'articleFeedbackv5-feedback-tools-list-'.$id |
| 382 | + 'id' => 'articleFeedbackv5-feedback-tools-list-' . $id |
383 | 383 | ) ); |
384 | 384 | |
385 | 385 | |
386 | | - if( $can_hide ) { |
| 386 | + if ( $can_hide ) { |
387 | 387 | $link = 'hide'; |
388 | | - if( $record[0]->af_hide_count > 0 ) { |
| 388 | + if ( $record[0]->af_hide_count > 0 ) { |
389 | 389 | # unhide |
390 | 390 | $link = 'unhide'; |
391 | 391 | $tools .= Html::element( 'li', array(), wfMessage( 'articlefeedbackv5-hidden' ) ); |
— | — | @@ -395,10 +395,10 @@ |
396 | 396 | ), wfMessage( "articlefeedbackv5-form-$link", $record[0]->af_hide_count )->text() ) ); |
397 | 397 | } |
398 | 398 | |
399 | | - if( $can_delete ) { |
| 399 | + if ( $can_delete ) { |
400 | 400 | # delete |
401 | 401 | $link = 'delete'; |
402 | | - if( $record[0]->af_delete_count > 0 ) { |
| 402 | + if ( $record[0]->af_delete_count > 0 ) { |
403 | 403 | $link = 'undelete'; |
404 | 404 | } |
405 | 405 | $tools .= Html::rawElement( 'li', array(), Html::element( 'a', array( |
— | — | @@ -408,18 +408,18 @@ |
409 | 409 | } |
410 | 410 | |
411 | 411 | $link = null; |
412 | | - if( $record[0]->af_needs_oversight ) { |
413 | | - if( $can_delete ) { |
| 412 | + if ( $record[0]->af_needs_oversight ) { |
| 413 | + if ( $can_delete ) { |
414 | 414 | $link = 'unoversight'; |
415 | 415 | } else { |
416 | 416 | $link = 'oversighted'; |
417 | 417 | } |
418 | | - } elseif( $can_hide ) { |
| 418 | + } elseif ( $can_hide ) { |
419 | 419 | # flag for oversight |
420 | 420 | $link = 'oversight'; |
421 | 421 | } |
422 | 422 | |
423 | | - if( $link ) { |
| 423 | + if ( $link ) { |
424 | 424 | $tools .= Html::rawElement( 'li', array(), Html::element( 'a', array( |
425 | 425 | 'id' => "articleFeedbackv5-$link-link-$id", |
426 | 426 | 'class' => "articleFeedbackv5-$link-link" |
— | — | @@ -479,10 +479,10 @@ |
480 | 480 | |
481 | 481 | private function renderBucket4( $record ) { |
482 | 482 | return $this->feedbackHead( |
483 | | - 'articlefeedbackv5-form4-header', |
484 | | - 'positive', |
485 | | - $record[0] |
486 | | - ); |
| 483 | + 'articlefeedbackv5-form4-header', |
| 484 | + 'positive', |
| 485 | + $record[0] |
| 486 | + ); |
487 | 487 | } |
488 | 488 | |
489 | 489 | private function renderBucket5( $record ) { |
— | — | @@ -502,16 +502,16 @@ |
503 | 503 | } |
504 | 504 | } |
505 | 505 | $body .= "</ul>"; |
506 | | - |
| 506 | + |
507 | 507 | $class = $total / $count >= 3 ? 'positive' : 'negative'; |
508 | 508 | |
509 | | - $head = $this->feedbackHead( |
510 | | - 'articlefeedbackv5-form5-header', |
511 | | - $class, |
512 | | - $record[0] |
| 509 | + $head = $this->feedbackHead( |
| 510 | + 'articlefeedbackv5-form5-header', |
| 511 | + $class, |
| 512 | + $record[0] |
513 | 513 | ); |
514 | 514 | |
515 | | - return $head.$body; |
| 515 | + return $head . $body; |
516 | 516 | } |
517 | 517 | |
518 | 518 | private function renderBucket0( $record ) { |
— | — | @@ -520,19 +520,19 @@ |
521 | 521 | } |
522 | 522 | |
523 | 523 | private function renderNoBucket( $record ) { |
524 | | - return $this->feedbackHead( |
| 524 | + return $this->feedbackHead( |
525 | 525 | 'articlefeedbackv5-form-invalid', |
526 | 526 | 'negative', |
527 | 527 | $record[0] |
528 | | - ); |
| 528 | + ); |
529 | 529 | } |
530 | 530 | |
531 | 531 | private function renderBucket6( $record ) { |
532 | | - return $this->feedbackHead( |
| 532 | + return $this->feedbackHead( |
533 | 533 | 'articlefeedbackv5-form-not-shown', |
534 | 534 | 'positive', |
535 | 535 | $record[0] |
536 | | - ); |
| 536 | + ); |
537 | 537 | } |
538 | 538 | |
539 | 539 | private function renderComment( $text, $feedbackId ) { |
— | — | @@ -548,10 +548,10 @@ |
549 | 549 | . htmlspecialchars( $short ) |
550 | 550 | . Html::closeElement( 'blockquote' ); |
551 | 551 | |
552 | | - // If the short string is the same size as the |
553 | | - // original, no truncation happened, so no |
| 552 | + // If the short string is the same size as the |
| 553 | + // original, no truncation happened, so no |
554 | 554 | // controls are needed. |
555 | | - if( $short != $text ) { |
| 555 | + if ( $short != $text ) { |
556 | 556 | // Show the short text, with the 'show more' control. |
557 | 557 | $rv .= Html::openElement( 'blockquote', |
558 | 558 | array( |
— | — | @@ -570,18 +570,18 @@ |
571 | 571 | } |
572 | 572 | |
573 | 573 | private function feedbackHead( $message, $class, $record, $extra = '' ) { |
574 | | - $gender = ''; #? |
| 574 | + $gender = ''; # ? |
575 | 575 | $name = htmlspecialchars( $record->user_name ); |
576 | 576 | $link = $record->af_user_id ? "User:$name" : "Special:Contributions/$name"; |
577 | 577 | |
578 | | - return Html::openElement( 'h3', array( |
| 578 | + return Html::openElement( 'h3', array( |
579 | 579 | 'class' => $class |
580 | 580 | ) ) |
581 | | - . Linker::link( Title::newFromText( $link ), $name ) |
| 581 | + . Linker::link( Title::newFromText( $link ), $name ) |
582 | 582 | . Html::element( 'span', array( 'class' => 'icon' ) ) |
583 | | - . Html::element( 'span', |
584 | | - array( 'class' => 'result' ), |
585 | | - wfMessage( $message, $gender, $extra )->escaped() |
| 583 | + . Html::element( 'span', |
| 584 | + array( 'class' => 'result' ), |
| 585 | + wfMessage( $message, $gender, $extra )->escaped() |
586 | 586 | ) |
587 | 587 | . Html::closeElement( 'h3' ); |
588 | 588 | } |
Index: trunk/extensions/ArticleFeedbackv5/api/ApiArticleFeedbackv5Utils.php |
— | — | @@ -153,7 +153,7 @@ |
154 | 154 | /** |
155 | 155 | * Increments the per-page-per-filter count rollups used on the feedback |
156 | 156 | * page. |
157 | | - * |
| 157 | + * |
158 | 158 | * @param $pageId int the ID of the page (page.page_id) |
159 | 159 | * @param $filterNames array values are names of filters to increment |
160 | 160 | */ |
— | — | @@ -164,7 +164,7 @@ |
165 | 165 | /** |
166 | 166 | * decrements the per-page-per-filter count rollups used on the feedback |
167 | 167 | * page. |
168 | | - * |
| 168 | + * |
169 | 169 | * @param $pageId int the ID of the page (page.page_id) |
170 | 170 | * @param $filterNames array values are names of filters to decrement |
171 | 171 | */ |
— | — | @@ -177,7 +177,7 @@ |
178 | 178 | |
179 | 179 | $dbw->begin(); |
180 | 180 | |
181 | | - foreach( $filters as $filter ) { |
| 181 | + foreach ( $filters as $filter ) { |
182 | 182 | $rows[] = array( |
183 | 183 | 'afc_page_id' => $pageId, |
184 | 184 | 'afc_filter_name' => $filter, |
— | — | @@ -196,7 +196,7 @@ |
197 | 197 | |
198 | 198 | $value = $decrement ? 'afc_filter_count - 1' : 'afc_filter_count + 1'; |
199 | 199 | |
200 | | - foreach( $filters as $filter ) { |
| 200 | + foreach ( $filters as $filter ) { |
201 | 201 | # Update each row with the new count. |
202 | 202 | $dbw->update( |
203 | 203 | 'aft_article_filter_count', |