Changeset 18924
- Timestamp:
- Nov 4, 2012, 6:41:29 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/category_cats.inc.php
r18892 r18924 40 40 count_categories 41 41 FROM '.CATEGORIES_TABLE.' c 42 INNER JOIN '.USER_CACHE_CATEGORIES_TABLE.' ucc 43 ON id = cat_id 42 INNER JOIN '.USER_CACHE_CATEGORIES_TABLE.' ucc 43 ON id = cat_id 44 44 AND user_id = '.$user['id']; 45 45 46 46 if ('recent_cats' == $page['section']) 47 47 { … … 60 60 'AND' 61 61 ); 62 62 63 63 if ('recent_cats' != $page['section']) 64 64 { … … 128 128 $user_representative_updates_for[ $user['id'].'#'.$row['id'] ] = $image_id; 129 129 } 130 130 131 131 $row['representative_picture_id'] = $image_id; 132 132 array_push($image_ids, $image_id); … … 220 220 $user_representative_updates_for[ $user['id'].'#'.$category['id'] ] = $image_id; 221 221 } 222 222 223 223 $category['representative_picture_id'] = $image_id; 224 224 } … … 241 241 } 242 242 } 243 243 244 244 foreach ($infos_of_image as &$info) 245 245 { … … 252 252 { 253 253 $updates = array(); 254 254 255 255 foreach ($user_representative_updates_for as $user_cat => $image_id) 256 256 { 257 257 list($user_id, $cat_id) = explode('#', $user_cat); 258 258 259 259 array_push( 260 260 $updates, … … 297 297 continue; 298 298 } 299 299 300 300 $category['name'] = trigger_event( 301 301 'render_category_name', … … 315 315 $representative_infos = $infos_of_image[ $category['representative_picture_id'] ]; 316 316 317 $tpl_var = 318 array( 319 'ID' => $category['id'], 317 $tpl_var = array_merge( $category, array( 318 'ID' => $category['id'] /*obsolete*/, 320 319 'representative' => $representative_infos, 321 320 'TN_ALT' => strip_tags($category['name']), … … 340 339 'subcatify_category_description')), 341 340 'NAME' => $name, 342 ) ;341 ) ); 343 342 if ($conf['index_new_icon']) 344 343 { … … 376 375 $tpl_thumbnails_var[] = $tpl_var; 377 376 } 378 377 379 378 // pagination 380 379 $page['total_categories'] = count($tpl_thumbnails_var); 381 380 382 381 $tpl_thumbnails_var = array_slice( 383 array_values($tpl_thumbnails_var),382 $tpl_thumbnails_var, 384 383 $page['startcat'], 385 384 $conf['nb_categories_page'] … … 387 386 388 387 $derivative_params = trigger_event('get_index_album_derivative_params', ImageStdParams::get_by_type(IMG_THUMB) ); 389 $tpl_thumbnails_var = trigger_event('loc_end_index_category_thumbnails', $tpl_thumbnails_var , $categories);388 $tpl_thumbnails_var = trigger_event('loc_end_index_category_thumbnails', $tpl_thumbnails_var); 390 389 $template->assign( array( 391 390 'category_thumbnails' => $tpl_thumbnails_var, … … 394 393 395 394 $template->assign_var_from_handle('CATEGORIES', 'index_category_thumbnails'); 396 395 397 396 // navigation bar 398 397 $page['cats_navigation_bar'] = array();
Note: See TracChangeset
for help on using the changeset viewer.