Changeset 9365
- Timestamp:
- Feb 24, 2011, 12:30:30 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/category_cats.inc.php
r9116 r9365 206 206 if ($row['id'] == $category['representative_picture_id']) 207 207 { 208 if ($category['count_images']>0) 208 // searching a random representant among elements in sub-categories 209 $image_id = get_random_image_in_category($category); 210 211 if (isset($image_id) and !in_array($image_id, $image_ids)) 209 212 { 210 // searching a random representant among elements in sub-categories 211 $image_id = get_random_image_in_category($category); 212 213 if (isset($image_id)) 214 { 215 if (!in_array($image_id, $image_ids)) 216 { 217 array_push($new_image_ids, $image_id); 218 } 219 220 $user_representative_updates_for[ $user['id'].'#'.$category['id'] ] = $image_id; 221 222 $category['representative_picture_id'] = $image_id; 223 } 213 array_push($new_image_ids, $image_id); 224 214 } 215 216 $user_representative_updates_for[ $user['id'].'#'.$category['id'] ] = $image_id; 217 218 $category['representative_picture_id'] = $image_id; 225 219 } 226 220 } … … 288 282 foreach ($categories as $category) 289 283 { 284 if (0 == $category['count_images']) 285 { 286 continue; 287 } 288 290 289 $category['name'] = trigger_event( 291 290 'render_category_name',
Note: See TracChangeset
for help on using the changeset viewer.