mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
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
This commit is contained in:
@@ -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')
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user