Changeset 8398
- Timestamp:
- Dec 30, 2010, 4:54:43 PM (14 years ago)
- Location:
- trunk/admin
- Files:
-
- 2 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 -
trunk/admin/themes/default/template/batch_manager_global.tpl
r8396 r8398 496 496 <!-- delete --> 497 497 <div id="action_delete" class="bulkAction"> 498 {if $ENABLE_SYNCHRONIZATION}499 <p style="font-style:italic;width:500px;">{'Note: photo deletion does not apply to photos added by synchronization. For photos added by synchronization, remove them from the filesystem and then perform another synchronization.'|@translate}</p>500 {/if}501 498 <p><label><input type="checkbox" name="confirm_deletion" value="1"> {'Are you sure?'|@translate}</label></p> 502 499 </div>
Note: See TracChangeset
for help on using the changeset viewer.