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:
parent
0e2436f50a
commit
a8cb550b92
1 changed files with 5 additions and 1 deletions
|
|
@ -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')
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue