aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2014-02-09 20:46:56 +0000
committerrvelices <rv-github@modusoptimus.com>2014-02-09 20:46:56 +0000
commit7304115d0ab04ba337289f56a651480f3797a495 (patch)
treeade1e4a9847aaf10d208e285fbf3f7aa7e700c8e
parent548494a2b710a009beb985f67074a3c5a6f423bb (diff)
Merged -r27294 from trunk:
feature 3043: Add event to allow calculation of rating score with a different algorithm git-svn-id: http://piwigo.org/svn/branches/2.6@27295 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--include/functions_rate.inc.php5
1 files changed, 5 insertions, 0 deletions
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,