From a1e0f1b52f1ef6bd6c68835748d9259cddff5e0d Mon Sep 17 00:00:00 2001 From: rvelices Date: Sun, 9 Feb 2014 20:46:06 +0000 Subject: feature 3043: Add event to allow calculation of rating score with a different algorithm git-svn-id: http://piwigo.org/svn/trunk@27294 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions_rate.inc.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/functions_rate.inc.php') diff --git a/include/functions_rate.inc.php b/include/functions_rate.inc.php index 2644caad9..ae896c29a 100644 --- a/include/functions_rate.inc.php +++ b/include/functions_rate.inc.php @@ -136,6 +136,11 @@ INSERT */ function update_rating_score($element_id = false) { + if ( ($alt_result = trigger_event('update_rating_score', false, $element_id)) !== false) + { + return $alt_result; + } + $query = ' SELECT element_id, COUNT(rate) AS rcount, -- cgit v1.2.3