Changeset 4731
- Timestamp:
- Jan 23, 2010, 11:57:01 PM (14 years ago)
- Location:
- trunk/admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/element_set_global.php
r4334 r4731 86 86 if (count($deletables) > 0) 87 87 { 88 // what will be the categories to update? (to avoid orphan on89 // representative_picture_id)90 $query = '91 SELECT92 category_id93 FROM '.IMAGE_CATEGORY_TABLE.'94 WHERE image_id IN ('.implode(',', $deletables).')95 ;';96 $categories_to_update = array_from_query($query, 'category_id');97 98 88 $physical_deletion = true; 99 89 delete_elements($deletables, $physical_deletion); 100 101 update_category($categories_to_update);102 90 103 91 array_push( -
trunk/admin/include/functions.php
r4618 r4731 263 263 pwg_query($query); 264 264 265 // are the photo used as category representant? 266 $query = ' 267 SELECT 268 id 269 FROM '.CATEGORIES_TABLE.' 270 WHERE representative_picture_id IN ( 271 '.wordwrap(implode(', ', $ids), 80, "\n").') 272 ;'; 273 $category_ids = array_from_query($query, 'id'); 274 if (count($category_ids) > 0) 275 { 276 update_category($category_ids); 277 } 278 265 279 trigger_action('delete_elements', $ids); 266 280 }
Note: See TracChangeset
for help on using the changeset viewer.