preilly has uploaded a new change for review.
https://gerrit.wikimedia.org/r/49942
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(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticleFeedback
refs/changes/42/49942/1
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: newchange
Gerrit-Change-Id: I9ff1b796d0da07918ed0cdb53b6355ddb6e5b884
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ArticleFeedback
Gerrit-Branch: master
Gerrit-Owner: preilly <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits