- Timestamp:
- Oct 10, 2011, 6:37:18 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/PWG_Stuffs/trunk/modules/BestRated/main.inc.php
r9581 r12401 24 24 ); 25 25 26 $query = '26 $query = ' 27 27 SELECT DISTINCT(i.id) 28 28 FROM '.IMAGES_TABLE.' AS i 29 29 INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON i.id = ic.image_id 30 30 INNER JOIN '.CATEGORIES_TABLE.' AS c ON ic.category_id = c.id 31 WHERE i. average_rate IS NOT NULL';31 WHERE i.rating_score IS NOT NULL'; 32 32 33 33 if (isset($page['category'])) … … 40 40 $query .= ' 41 41 '.$forbidden.' 42 ORDER BY i.average_rate DESC, i.id ASC43 44 42 ORDER BY i.rating_score DESC, i.id DESC 43 LIMIT 0, '.$datas['nb_images'].' 44 ;'; 45 45 46 46 $pictures = array(); … … 127 127 } 128 128 129 if ($conf['show_thumbnail_caption']) 130 {// name of the picture 131 if (isset($row['name']) and $row['name'] != '') 132 { 133 $name = $row['name']; 134 } 135 else 136 { 137 $name = str_replace('_', ' ', get_filename_wo_extension($row['file'])); 138 } 129 if (isset($row['name']) and $row['name'] != '') 130 { 131 $name = $row['name']; 132 } 133 else 134 { 135 $name = str_replace('_', ' ', get_filename_wo_extension($row['file'])); 136 } 139 137 140 $tpl_var['NAME'] = '('.$row['average_rate'].') '.$name; 141 } 138 $tpl_var['NAME'] = '('.$row['rating_score'].') '.$name; 142 139 143 140 if ( isset($nb_comments_of) )
Note: See TracChangeset
for help on using the changeset viewer.