Changeset 18892
- Timestamp:
- Nov 2, 2012, 4:04:54 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/category_cats.inc.php
r18464 r18892 70 70 ;'; 71 71 72 $categories_sql = hash_from_query($query, 'id'); 73 74 if ($page['section']=='recent_cats') 75 { 76 usort($categories_sql, 'global_rank_compare'); 77 } 78 79 $page['total_categories'] = count($categories_sql); 80 81 $categories_sql = array_slice( 82 array_values($categories_sql), 83 $page['startcat'], 84 $conf['nb_categories_page'] 85 ); 86 87 $categories_sql = trigger_event('loc_index_categories_selection', $categories_sql); 88 72 $result = pwg_query($query); 89 73 $categories = array(); 90 74 $category_ids = array(); … … 92 76 $user_representative_updates_for = array(); 93 77 94 foreach ($categories_sql as $row)78 while ($row = pwg_db_fetch_assoc($result)) 95 79 { 96 80 $row['is_child_date_last'] = @$row['max_date_last']>@$row['date_last']; … … 188 172 } 189 173 174 if ($page['section']=='recent_cats') 175 { 176 usort($categories, 'global_rank_compare'); 177 } 178 190 179 if (count($categories) > 0) 191 180 { … … 387 376 $tpl_thumbnails_var[] = $tpl_var; 388 377 } 378 379 // pagination 380 $page['total_categories'] = count($tpl_thumbnails_var); 381 382 $tpl_thumbnails_var = array_slice( 383 array_values($tpl_thumbnails_var), 384 $page['startcat'], 385 $conf['nb_categories_page'] 386 ); 389 387 390 388 $derivative_params = trigger_event('get_index_album_derivative_params', ImageStdParams::get_by_type(IMG_THUMB) );
Note: See TracChangeset
for help on using the changeset viewer.