Changeset 4730 for branches/2.0/admin
- Timestamp:
- Jan 23, 2010, 11:56:11 PM (15 years ago)
- Location:
- branches/2.0/admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/admin/element_set_global.php
r4495 r4730 92 92 if (count($deletables) > 0) 93 93 { 94 // what will be the categories to update? (to avoid orphan on95 // representative_picture_id)96 $query = '97 SELECT98 category_id99 FROM '.IMAGE_CATEGORY_TABLE.'100 WHERE image_id IN ('.implode(',', $deletables).')101 ;';102 $categories_to_update = array_from_query($query, 'category_id');103 104 94 $physical_deletion = true; 105 95 delete_elements($deletables, $physical_deletion); 106 107 update_category($categories_to_update);108 96 109 97 array_push( -
branches/2.0/admin/include/functions.php
r4617 r4730 235 235 pwg_query($query); 236 236 237 // are the photo used as category representant? 238 $query = ' 239 SELECT 240 id 241 FROM '.CATEGORIES_TABLE.' 242 WHERE representative_picture_id IN ( 243 '.wordwrap(implode(', ', $ids), 80, "\n").') 244 ;'; 245 $category_ids = array_from_query($query, 'id'); 246 if (count($category_ids) > 0) 247 { 248 update_category($category_ids); 249 } 250 237 251 trigger_action('delete_elements', $ids); 238 252 }
Note: See TracChangeset
for help on using the changeset viewer.