aboutsummaryrefslogtreecommitdiffstats
path: root/include/section_init.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2011-08-02 19:20:50 +0000
committerrvelices <rv-github@modusoptimus.com>2011-08-02 19:20:50 +0000
commit86ae4d8b3ae8d1a4b3f78567dd8f67aa48ef43a8 (patch)
treecf4067b3b6298d2f700b6b5f59187ffe8e4efc55 /include/section_init.inc.php
parenta61fea92834dcadc8c1a648ca1fdb2c56d2079cd (diff)
rename #images.average_rate to rating_score
git-svn-id: http://piwigo.org/svn/trunk@11893 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/section_init.inc.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/section_init.inc.php b/include/section_init.inc.php
index da064cb68..a3f617e41 100644
--- a/include/section_init.inc.php
+++ b/include/section_init.inc.php
@@ -61,10 +61,10 @@ else
$rewritten = $key;
break;
}
-
+
// the $_GET keys are not protected in include/common.inc.php, only the values
$rewritten = pwg_db_real_escape_string($rewritten);
-
+
$page['root_path'] = PHPWG_ROOT_PATH;
}
@@ -463,9 +463,9 @@ SELECT DISTINCT(id)
else if ($page['section'] == 'most_visited')
{
$page['super_order_by'] = true;
- $conf['order_by'] = ' ORDER BY hit DESC, file ASC';
+ $conf['order_by'] = ' ORDER BY hit DESC, id DESC';
$query = '
-SELECT DISTINCT(id), hit, file
+SELECT DISTINCT(id)
FROM '.IMAGES_TABLE.'
INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id
WHERE hit > 0
@@ -489,13 +489,13 @@ SELECT DISTINCT(id), hit, file
else if ($page['section'] == 'best_rated')
{
$page['super_order_by'] = true;
- $conf['order_by'] = ' ORDER BY average_rate DESC, id ASC';
+ $conf['order_by'] = ' ORDER BY rating_score DESC, id DESC';
$query ='
-SELECT DISTINCT(id), average_rate
+SELECT DISTINCT(id)
FROM '.IMAGES_TABLE.'
INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id
- WHERE average_rate IS NOT NULL
+ WHERE rating_score IS NOT NULL
'.$forbidden.'
'.$conf['order_by'].'
LIMIT '.$conf['top_number'].'