From c0bb4dfb43d05d68cb4abe69e279e91c88bd2f11 Mon Sep 17 00:00:00 2001 From: rvelices Date: Tue, 26 Jul 2011 19:04:50 +0000 Subject: feature 2384: improve average rating calculation (final) git-svn-id: http://piwigo.org/svn/trunk@11839 68402e56-0260-453c-a942-63ccdbb3a9ee --- picture.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'picture.php') diff --git a/picture.php b/picture.php index 60dc7cc52..fb7b19307 100644 --- a/picture.php +++ b/picture.php @@ -313,22 +313,15 @@ UPDATE '.USER_CACHE_CATEGORIES_TABLE.' case 'rate' : { include_once(PHPWG_ROOT_PATH.'include/functions_rate.inc.php'); - rate_picture( - $page['image_id'], - isset($_POST['rate']) ? $_POST['rate'] : $_GET['rate'] - ); + rate_picture($page['image_id'], $_POST['rate']); redirect($url_self); } case 'edit_comment' : { check_pwg_token(); - include_once(PHPWG_ROOT_PATH.'include/functions_comment.inc.php'); - check_input_parameter('comment_to_edit', $_GET, false, PATTERN_ID); - $author_id = get_comment_author_id($_GET['comment_to_edit']); - if (can_manage_comment('edit', $author_id)) { if (!empty($_POST['content'])) @@ -441,7 +434,7 @@ $result = pwg_query($query); $related_categories = array(); while ($row = pwg_db_fetch_assoc($result)) { - $row['commentable'] = boolean_to_string($row['commentable']); + $row['commentable'] = get_boolean($row['commentable']); array_push($related_categories, $row); } usort($related_categories, 'global_rank_compare'); -- cgit v1.2.3