diff options
author | z0rglub <z0rglub@piwigo.org> | 2004-08-31 21:32:58 +0000 |
---|---|---|
committer | z0rglub <z0rglub@piwigo.org> | 2004-08-31 21:32:58 +0000 |
commit | a8cb550b92ff3230b5b062d85bebccdca75580de (patch) | |
tree | 595515cbb1cb401b987831b7994c83c1acdf9211 /include/category_default.inc.php | |
parent | 0e2436f50a61f90da22e75085280bf9f2087699a (diff) |
if category is best_rated : displays the average rate of the element before
its name
git-svn-id: http://piwigo.org/svn/trunk@508 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/category_default.inc.php')
-rw-r--r-- | include/category_default.inc.php | 6 |
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') { |