Skip to content

Commit

Permalink
feature 3043: Add event to allow calculation of rating score with a d…
Browse files Browse the repository at this point in the history
…ifferent algorithm

git-svn-id: http://piwigo.org/svn/trunk@27294 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
rvelices committed Feb 9, 2014
1 parent 57dc064 commit a1e0f1b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/functions_rate.inc.php
Expand Up @@ -136,6 +136,11 @@ function rate_picture($image_id, $rate)
*/
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,
Expand Down

0 comments on commit a1e0f1b

Please sign in to comment.