r78455 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78454‎ | r78455 | r78456 >
Date:22:13, 15 December 2010
Author:reedy
Status:deferred
Tags:
Comment:
Fix stupid refactoring bugs

Fix wrong variable name usage. Put $thisRating and $lastRating through intval to garuntee type
Modified paths:
  • /trunk/extensions/ArticleFeedback/api/ApiArticleFeedback.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedback/api/ApiArticleFeedback.php
@@ -90,13 +90,13 @@
9191 // -1 == Rating last time, but abstained this time
9292 $countChange = 0;
9393 if ( $lastRating === false || $lastRating === 0 ) {
94 - if ( $newRating === 0 ) {
 94+ if ( $thisRating === 0 ) {
9595 $countChange = 0;
9696 } else {
9797 $countChange = 1;
9898 }
9999 } else { // Last rating was > 0
100 - if ( $newRating === 0 ) {
 100+ if ( $thisRating === 0 ) {
101101 $countChange = -1;
102102 } else {
103103 $countChange = 0;

Follow-up revisions

RevisionCommit summaryAuthorDate
r78456Followup r78455, actually add intval to that working copyreedy22:15, 15 December 2010

Status & tagging log