Changeset 8398 for trunk/admin/batch_manager_global.php
- Timestamp:
- Dec 30, 2010, 4:54:43 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/batch_manager_global.php
r8397 r8398 152 152 // we remove the dissociated images if we are currently displaying the 153 153 // category to dissociate from. 154 // 155 // TODO we can display the photo of a given album without the $_GET['cat'] 154 156 if (is_numeric($_GET['cat']) and $_POST['dissociate'] == $_GET['cat']) 155 157 { … … 270 272 if (isset($_POST['confirm_deletion']) and 1 == $_POST['confirm_deletion']) 271 273 { 272 // filter selection on photos that have no storage_category_id (ie 273 // that were added via pLoader) 274 $query = ' 275 SELECT id 276 FROM '.IMAGES_TABLE.' 277 WHERE id IN ('.implode(',', $collection).') 278 AND storage_category_id IS NULL 279 ;'; 280 $deletables = array_from_query($query, 'id'); 281 282 if (count($deletables) > 0) 274 $deleted_count = delete_elements($collection, true); 275 if ($deleted_count > 0) 283 276 { 284 $physical_deletion = true; 285 delete_elements($deletables, $physical_deletion); 286 287 array_push( 288 $page['infos'], 277 $_SESSION['page_infos'] = array( 289 278 sprintf( 290 279 l10n_dec( 291 280 '%d photo was deleted', 292 281 '%d photos were deleted', 293 count($deletables)282 $deleted_count 294 283 ), 295 count($deletables)284 $deleted_count 296 285 ) 297 286 ); 298 287 299 // we have to remove the deleted photos from the current set300 $page['cat_elements_id'] = array_diff($page['cat_elements_id'], $deletables);288 $redirect_url = get_root_url().'admin.php?page='.$_GET['page']; 289 redirect($redirect_url); 301 290 } 302 291 else
Note: See TracChangeset
for help on using the changeset viewer.