Changeset 12545
- Timestamp:
- Nov 5, 2011, 12:49:03 AM (12 years ago)
- Location:
- branches/2.3/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.3/include/category_cats.inc.php
r11739 r12545 177 177 if (count($categories) > 0) 178 178 { 179 $ thumbnail_src_of= array();179 $infos_of_image = array(); 180 180 $new_image_ids = array(); 181 181 182 182 $query = ' 183 SELECT id, path, tn_ext, level183 SELECT * 184 184 FROM '.IMAGES_TABLE.' 185 185 WHERE id IN ('.implode(',', $image_ids).') … … 190 190 if ($row['level'] <= $user['level']) 191 191 { 192 $thumbnail_src_of[$row['id']] = get_thumbnail_url($row); 192 $row['tn_src'] = get_thumbnail_url($row); 193 $infos_of_image[$row['id']] = $row; 193 194 } 194 195 else … … 229 230 { 230 231 $query = ' 231 SELECT id, path, tn_ext232 SELECT * 232 233 FROM '.IMAGES_TABLE.' 233 234 WHERE id IN ('.implode(',', $new_image_ids).') … … 236 237 while ($row = pwg_db_fetch_assoc($result)) 237 238 { 238 $thumbnail_src_of[$row['id']] = get_thumbnail_url($row); 239 $row['tn_src'] = get_thumbnail_url($row); 240 $infos_of_image[$row['id']] = $row; 239 241 } 240 242 } … … 305 307 } 306 308 309 $representative_infos = $infos_of_image[ $category['representative_picture_id'] ]; 310 307 311 $tpl_var = 308 312 array( 309 313 'ID' => $category['id'], 310 'TN_SRC' => $ thumbnail_src_of[$category['representative_picture_id']],314 'TN_SRC' => $representative_infos['tn_src'], 311 315 'TN_ALT' => strip_tags($category['name']), 312 316 … … 330 334 'subcatify_category_description')), 331 335 'NAME' => $name, 336 337 // Extra fields for usage in extra themes 338 'FILE_PATH' => $representative_infos['path'], 339 'FILE_POSTED' => $representative_infos['date_available'], 340 'FILE_CREATED' => $representative_infos['date_creation'], 341 'FILE_DESC' => $representative_infos['comment'], 342 'FILE_AUTHOR' => $representative_infos['author'], 343 'FILE_HIT' => $representative_infos['hit'], 344 'FILE_SIZE' => $representative_infos['filesize'], 345 'FILE_WIDTH' => $representative_infos['width'], 346 'FILE_HEIGHT' => $representative_infos['height'], 347 'FILE_METADATE' => $representative_infos['date_metadata_update'], 348 'FILE_HAS_HD' => $representative_infos['has_high'], 349 'FILE_HD_WIDTH' => $representative_infos['high_width'], 350 'FILE_HD_HEIGHT' => $representative_infos['high_height'], 351 'FILE_HD_FILESIZE' => $representative_infos['high_filesize'], 352 'FILE_RATING_SCORE' => $representative_infos['rating_score'], 332 353 ); 333 354 if ($conf['index_new_icon']) -
branches/2.3/include/category_default.inc.php
r12452 r12545 112 112 $name = get_picture_title($row); 113 113 114 $tpl_var = 115 array( 116 'ID' => $row['id'], 117 'TN_SRC' => get_thumbnail_url($row), 118 'TN_ALT' => htmlspecialchars(strip_tags($name)), 119 'TN_TITLE' => get_thumbnail_title($row), 120 'URL' => $url, 114 $tpl_var = array( 115 'ID' => $row['id'], 116 'TN_SRC' => get_thumbnail_url($row), 117 'TN_ALT' => htmlspecialchars(strip_tags($name)), 118 'TN_TITLE' => get_thumbnail_title($row), 119 'URL' => $url, 121 120 122 /* Fields for template-extension usage */ 123 'FILE_PATH' => $row['path'], 124 'FILE_POSTED' => $row['date_available'], 125 'FILE_CREATED' => $row['date_creation'], 126 'FILE_DESC' => $row['comment'], 127 'FILE_AUTHOR' => $row['author'], 128 'FILE_HIT' => $row['hit'], 129 'FILE_SIZE' => $row['filesize'], 130 'FILE_WIDTH' => $row['width'], 131 'FILE_HEIGHT' => $row['height'], 132 'FILE_METADATE' => $row['date_metadata_update'], 133 'FILE_HAS_HD' => ($row['has_high'] and $user['enabled_high']=='true') ? 134 true:false, /* lack of include/functions_picture.inc.php */ 121 // Extra fields for usage in extra themes 122 'FILE_PATH' => $row['path'], 123 'FILE_POSTED' => $row['date_available'], 124 'FILE_CREATED' => $row['date_creation'], 125 'FILE_DESC' => $row['comment'], 126 'FILE_AUTHOR' => $row['author'], 127 'FILE_HIT' => $row['hit'], 128 'FILE_SIZE' => $row['filesize'], 129 'FILE_WIDTH' => $row['width'], 130 'FILE_HEIGHT' => $row['height'], 131 'FILE_METADATE' => $row['date_metadata_update'], 132 'FILE_HAS_HD' => $row['has_high'], 133 'FILE_HD_WIDTH' => $row['high_width'], 134 'FILE_HD_HEIGHT' => $row['high_height'], 135 'FILE_HD_FILESIZE' => $row['high_filesize'], 136 'FILE_RATING_SCORE' => $row['rating_score'], 135 137 ); 138 136 139 if ($conf['index_new_icon']) 137 140 {
Note: See TracChangeset
for help on using the changeset viewer.