- Timestamp:
- Feb 15, 2006, 3:29:26 AM (19 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin.php
r1029 r1042 84 84 'U_WAITING'=> $link_start.'waiting', 85 85 'U_COMMENTS'=> $link_start.'comments', 86 'U_RATING'=> $link_start.'rating', 86 87 'U_CADDIE'=> $link_start.'element_set&cat=caddie', 87 88 'U_THUMBNAILS'=> $link_start.'thumbnail', -
trunk/admin/include/functions.php
r1028 r1042 1312 1312 /** 1313 1313 * update images.average_rate field 1314 * 1314 * param int $element_id optional, otherwise applies to all 1315 1315 * @return void 1316 1316 */ 1317 function update_average_rate( )1317 function update_average_rate( $element_id=-1 ) 1318 1318 { 1319 1319 $average_rates = array(); … … 1322 1322 SELECT element_id, 1323 1323 ROUND(AVG(rate),2) AS average_rate 1324 FROM '.RATE_TABLE.' 1325 GROUP BY element_id 1326 ;'; 1324 FROM '.RATE_TABLE; 1325 if ( $element_id != -1 ) 1326 { 1327 $query .= ' WHERE element_id=' . $element_id; 1328 } 1329 $query .= ' GROUP BY element_id;'; 1330 1327 1331 $result = pwg_query($query); 1328 1332 while ($row = mysql_fetch_array($result)) … … 1344 1348 $fields = array('primary' => array('id'), 'update' => array('average_rate')); 1345 1349 mass_updates(IMAGES_TABLE, $fields, $datas); 1350 1351 $query=' 1352 UPDATE '.IMAGES_TABLE .' 1353 LEFT JOIN '.RATE_TABLE.' ON id=element_id 1354 SET average_rate=NULL 1355 WHERE element_id IS NULL'; 1356 if ( $element_id != -1 ) 1357 { 1358 $query .= ' AND id=' . $element_id; 1359 } 1360 pwg_query($query); 1346 1361 } 1347 1362 -
trunk/include/functions_category.inc.php
r1036 r1042 260 260 return array( 261 261 array('Default', '', true), 262 array(l10n(' best_rated_cat'),'average_rate DESC', $conf['rate']),262 array(l10n('Average rate'), 'average_rate DESC', $conf['rate']), 263 263 array(l10n('most_visited_cat'), 'hit DESC', true), 264 264 array(l10n('Creation date'), 'date_creation DESC', true), -
trunk/language/en_UK.iso-8859-1/admin.lang.php
r927 r1042 54 54 $lang['Check for upgrade'] = 'Check for upgrade'; 55 55 $lang['Comments for all'] = 'Comments for all'; 56 $lang['Controversy'] = 'Controversy'; 56 57 $lang['Creation date'] = 'Creation date'; 57 58 $lang['Database'] = 'Database'; … … 98 99 $lang['Number of comments per page'] = 'Number of comments per page'; 99 100 $lang['Number of images per row'] = 'Number of images per row'; 101 $lang['Number of rates'] = 'Number of rates'; 100 102 $lang['Number of rows per page'] = 'Number of rows per page'; 101 103 $lang['Number of thumbnails to create'] = 'Number of thumbnails to create'; … … 117 119 $lang['Properties'] = 'Properties'; 118 120 $lang['Random picture'] = 'Random picture'; 121 $lang['Rate date'] = 'Rate date'; 122 $lang['Rating'] = 'Rating'; 119 123 $lang['Recent period'] = 'Recent period'; 120 124 $lang['Registration date'] = 'Registration date'; … … 134 138 $lang['Storage category'] = 'Storage category'; 135 139 $lang['Submit'] = 'Submit'; 140 $lang['Sum of rates'] = 'Sum of rates'; 136 141 $lang['Take selected elements out of caddie'] = 'Take selected elements out of caddie'; 137 142 $lang['Unable to check for upgrade since allow_url_fopen is disabled.'] = 'Unable to check for upgrade since allow_url_fopen is disabled.'; -
trunk/language/en_UK.iso-8859-1/common.lang.php
r1029 r1042 91 91 $lang['Profile'] = 'Profile'; 92 92 $lang['Quick connect'] = 'Quick connect'; 93 $lang['Rate'] = 'Rate'; 93 94 $lang['RSS feed'] = 'RSS feed'; 94 95 $lang['Register'] = 'Register'; … … 297 298 $lang['title_menu'] = 'Menu'; 298 299 $lang['title_send_mail'] = 'A comment on your site'; 299 $lang['to_rate'] = 'Rate';300 300 $lang['today'] = 'today'; 301 301 $lang['total'] = 'images'; -
trunk/language/fr_FR.iso-8859-1/admin.lang.php
r1025 r1042 54 54 $lang['Check for upgrade'] = 'Dernière version ?'; 55 55 $lang['Comments for all'] = 'Commentaires utilisateur pour tous'; 56 $lang['Controversy'] = 'Controverse'; 56 57 $lang['Creation date'] = 'Date de création'; 57 58 $lang['Database'] = 'Base de données'; … … 98 99 $lang['Number of comments per page'] = 'Nombre de commentaires utilisateur par page'; 99 100 $lang['Number of images per row'] = 'Nombre de miniatures par ligne'; 101 $lang['Number of rates'] = 'Nombre de notes'; 100 102 $lang['Number of rows per page'] = 'Nombre de lignes par page'; 101 103 $lang['Number of thumbnails to create'] = 'Nombre de miniatures à créer'; … … 117 119 $lang['Properties'] = 'Propriétés'; 118 120 $lang['Random picture'] = 'Au hasard'; 121 $lang['Rate date'] = 'Date de notation'; 122 $lang['Rating'] = 'Notation'; 119 123 $lang['Recent period'] = 'Période récente'; 120 124 $lang['Registration date'] = 'Date d\'enregistrement'; … … 134 138 $lang['Storage category'] = 'Catégorie de stockage'; 135 139 $lang['Submit'] = 'Valider'; 140 $lang['Sum of rates'] = 'Somme des notes'; 136 141 $lang['Take selected elements out of caddie'] = 'Sortir les éléments sélectionnés du panier'; 137 142 $lang['Unable to check for upgrade since allow_url_fopen is disabled.'] = 'Impossible de connaître la dernière version cat la fonction allow_url_fopen est désactivée.'; -
trunk/language/fr_FR.iso-8859-1/common.lang.php
r1029 r1042 90 90 $lang['Profile'] = 'Profil'; 91 91 $lang['Quick connect'] = 'Connexion rapide'; 92 $lang['Rate'] = 'Note'; 92 93 $lang['RSS feed'] = 'flux RSS'; 93 94 $lang['Register'] = 'S\'enregistrer'; … … 296 297 $lang['title_menu'] = 'Menu'; 297 298 $lang['title_send_mail'] = 'Un commentaire sur le site'; 298 $lang['to_rate'] = 'Note';299 299 $lang['today'] = 'aujourd\'hui'; 300 300 $lang['total'] = 'images'; -
trunk/picture.php
r1041 r1042 1043 1043 else 1044 1044 { 1045 $sentence = $lang['never_rated'].'. '.$lang[' to_rate'];1045 $sentence = $lang['never_rated'].'. '.$lang['Rate']; 1046 1046 } 1047 1047 } 1048 1048 else 1049 1049 { 1050 $sentence = $lang['never_rated'].'. '.$lang[' to_rate'];1050 $sentence = $lang['never_rated'].'. '.$lang['Rate']; 1051 1051 } 1052 1052 $template->assign_block_vars( -
trunk/template/yoga/admin.tpl
r1029 r1042 53 53 <li><a href="{U_THUMBNAILS}">{lang:thumbnails}</a></li> 54 54 <li><a href="{U_COMMENTS}">{lang:comments}</a></li> 55 <li><a href="{U_RATING}">{lang:Rating}</a></li> 55 56 <li><a href="{U_CADDIE}">{lang:Caddie}</a></li> 56 57 </ul>
Note: See TracChangeset
for help on using the changeset viewer.