aboutsummaryrefslogtreecommitdiffstats
path: root/picture.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2011-07-26 19:04:50 +0000
committerrvelices <rv-github@modusoptimus.com>2011-07-26 19:04:50 +0000
commitc0bb4dfb43d05d68cb4abe69e279e91c88bd2f11 (patch)
treed82bf347d8b4a5deb8532371e7073e2692737bec /picture.php
parent630c4bb85e82c956053526255097f3fa706427b4 (diff)
feature 2384: improve average rating calculation (final)
git-svn-id: http://piwigo.org/svn/trunk@11839 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'picture.php')
-rw-r--r--picture.php11
1 files changed, 2 insertions, 9 deletions
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');