Changeset 8848
- Timestamp:
- Jan 23, 2011, 1:10:29 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/functions.php
r8802 r8848 98 98 ;'; 99 99 $image_ids_linked = array_from_query($query, 'image_id'); 100 101 if ('delete_orphans' == $photo_deletion_mode) 102 { 103 $query = ' 100 101 if (count($image_ids_linked) > 0) 102 { 103 if ('delete_orphans' == $photo_deletion_mode) 104 { 105 $query = ' 104 106 SELECT 105 107 DISTINCT(image_id) … … 108 110 AND category_id NOT IN ('.implode(',', $ids).') 109 111 ;'; 110 $image_ids_not_orphans = array_from_query($query, 'image_id'); 111 $image_ids_to_delete = array_diff($image_ids_linked, $image_ids_not_orphans); 112 } 113 114 if ('force_delete' == $photo_deletion_mode) 115 { 116 $image_ids_to_delete = $image_ids_linked; 117 } 118 119 delete_elements($image_ids_to_delete, true); 112 $image_ids_not_orphans = array_from_query($query, 'image_id'); 113 $image_ids_to_delete = array_diff($image_ids_linked, $image_ids_not_orphans); 114 } 115 116 if ('force_delete' == $photo_deletion_mode) 117 { 118 $image_ids_to_delete = $image_ids_linked; 119 } 120 121 delete_elements($image_ids_to_delete, true); 122 } 120 123 } 121 124
Note: See TracChangeset
for help on using the changeset viewer.