Asher has submitted this change and it was merged.

Change subject: replace call to MAX with GREATEST
......................................................................


replace call to MAX with GREATEST

Change-Id: I9ff1b796d0da07918ed0cdb53b6355ddb6e5b884
---
M api/ApiArticleFeedback.php
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Asher: Verified; Looks good to me, approved



diff --git a/api/ApiArticleFeedback.php b/api/ApiArticleFeedback.php
index 6f35b43..9967df0 100644
--- a/api/ApiArticleFeedback.php
+++ b/api/ApiArticleFeedback.php
@@ -142,7 +142,7 @@
                $dbw->update(
                        'article_feedback_pages',
                        array(
-                               "aap_total = MAX( aap_total + $updateAddition, 
0 )",
+                               "aap_total = GREATEST( aap_total + 
$updateAddition, 0 )",
                                'aap_count = aap_count + ' . 
$this->getCountChange( $lastRating, $thisRating ),
                        ),
                        array(
@@ -184,7 +184,7 @@
                $dbw->update(
                        'article_feedback_revisions',
                        array(
-                               "afr_total = MAX( afr_total + $updateAddition, 
0 )",
+                               "afr_total = GREATEST( afr_total + 
$updateAddition, 0 )",
                                'afr_count = afr_count + ' . 
$this->getCountChange( $lastRating, $thisRating ),
                        ),
                        array(

-- 
To view, visit https://gerrit.wikimedia.org/r/49942
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9ff1b796d0da07918ed0cdb53b6355ddb6e5b884
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ArticleFeedback
Gerrit-Branch: master
Gerrit-Owner: preilly <[email protected]>
Gerrit-Reviewer: Asher <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to