aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/category_default.inc.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/category_default.inc.php b/include/category_default.inc.php
index 73ad7af37..409829282 100644
--- a/include/category_default.inc.php
+++ b/include/category_default.inc.php
@@ -39,7 +39,7 @@ $array_cat_directories = array();
$query = '
SELECT DISTINCT(id),file,date_available
- ,tn_ext,name,filesize,storage_category_id
+ ,tn_ext,name,filesize,storage_category_id,average_rate
FROM '.IMAGES_TABLE.' AS i
INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id=ic.image_id
'.$page['where'].'
@@ -79,6 +79,10 @@ while ($row = mysql_fetch_array($result))
{
$name = str_replace('_', ' ', $file);
}
+ if ($page['cat'] == 'best_rated')
+ {
+ $name = '('.$row['average_rate'].') '.$name;
+ }
if ($page['cat'] == 'search')
{