Changeset 13064 for trunk/admin/batch_manager_global.php
- Timestamp:
- Feb 9, 2012, 11:16:56 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/batch_manager_global.php
r13063 r13064 45 45 check_input_parameter('del_tags', $_POST, true, PATTERN_ID); 46 46 check_input_parameter('associate', $_POST, false, PATTERN_ID); 47 check_input_parameter('move', $_POST, false, PATTERN_ID); 47 48 check_input_parameter('dissociate', $_POST, false, PATTERN_ID); 48 49 … … 174 175 redirect($redirect_url); 175 176 } 177 } 178 } 179 180 if ('move' == $action) 181 { 182 // let's first break links with all albums but their "storage album" 183 $query = ' 184 DELETE '.IMAGE_CATEGORY_TABLE.'.* 185 FROM '.IMAGE_CATEGORY_TABLE.' 186 JOIN '.IMAGES_TABLE.' ON image_id=id 187 WHERE id IN ('.implode(',', $collection).') 188 AND (storage_category_id IS NULL OR storage_category_id != category_id) 189 ;'; 190 pwg_query($query); 191 192 associate_images_to_categories( 193 $collection, 194 array($_POST['move']) 195 ); 196 197 $_SESSION['page_infos'] = array( 198 l10n('Information data registered in database') 199 ); 200 201 // let's refresh the page because we the current set might be modified 202 if ('with no album' == $page['prefilter']) 203 { 204 redirect($redirect_url); 205 } 206 207 if ('with no virtual album' == $page['prefilter']) 208 { 209 $category_info = get_cat_info($_POST['move']); 210 if (empty($category_info['dir'])) 211 { 212 redirect($redirect_url); 213 } 214 } 215 216 if (isset($_SESSION['bulk_manager_filter']['category']) 217 and $_POST['move'] != $_SESSION['bulk_manager_filter']['category']) 218 { 219 redirect($redirect_url); 176 220 } 177 221 } … … 204 248 pwg_query($query); 205 249 206 update_category($_POST['dissociate']);207 208 250 $_SESSION['page_infos'] = array( 209 251 l10n('Information data registered in database') 210 252 ); 211 253 212 // let's refresh the page because wethe current set might be modified254 // let's refresh the page because the current set might be modified 213 255 redirect($redirect_url); 214 256 } … … 529 571 ;'; 530 572 display_select_cat_wrapper($query, array(), 'associate_options', true); 573 display_select_cat_wrapper($query, array(), 'move_options', true); 531 574 display_select_cat_wrapper($query, array(), 'category_parent_options'); 532 575
Note: See TracChangeset
for help on using the changeset viewer.