Changeset 12546 for trunk/include/category_cats.inc.php
- Timestamp:
- Nov 5, 2011, 12:54:12 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/category_cats.inc.php
r11739 r12546 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'])
Note: See TracChangeset
for help on using the changeset viewer.