Changeset 28701 for trunk/admin
- Timestamp:
- Jun 14, 2014, 10:28:59 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/batch_manager_global.php
r28700 r28701 87 87 88 88 $action = $_POST['selectAction']; 89 $redirect = false; 89 90 90 91 if ('remove_from_caddie' == $action) … … 99 100 100 101 // remove from caddie action available only in caddie so reload content 101 redirect($redirect_url);102 } 103 104 if ('add_tags' == $action)102 $redirect = true; 103 } 104 105 else if ('add_tags' == $action) 105 106 { 106 107 if (empty($_POST['add_tags'])) … … 115 116 if ('no_tag' == $page['prefilter']) 116 117 { 117 redirect($redirect_url);118 } 119 } 120 } 121 122 if ('del_tags' == $action)123 { 124 125 126 $query = '118 $redirect = true; 119 } 120 } 121 } 122 123 else if ('del_tags' == $action) 124 { 125 if (isset($_POST['del_tags']) and count($_POST['del_tags']) > 0) 126 { 127 $query = ' 127 128 DELETE 128 129 FROM '.IMAGE_TAG_TABLE.' … … 130 131 AND tag_id IN ('.implode(',', $_POST['del_tags']).') 131 132 ;'; 132 pwg_query($query); 133 } 134 else 135 { 133 pwg_query($query); 134 135 if (isset($_SESSION['bulk_manager_filter']['tags']) && 136 count(array_intersect($_SESSION['bulk_manager_filter']['tags'], $_POST['del_tags']))) 137 { 138 $redirect = true; 139 } 140 } 141 else 142 { 136 143 $page['errors'][] = l10n('Select at least one tag'); 137 144 } 138 145 } 139 146 … … 152 159 if ('no_album' == $page['prefilter']) 153 160 { 154 redirect($redirect_url);155 } 156 157 if ('no_virtual_album' == $page['prefilter'])161 $redirect = true; 162 } 163 164 else if ('no_virtual_album' == $page['prefilter']) 158 165 { 159 166 $category_info = get_cat_info($_POST['associate']); 160 167 if (empty($category_info['dir'])) 161 168 { 162 redirect($redirect_url);163 } 164 } 165 } 166 167 if ('move' == $action)169 $redirect = true; 170 } 171 } 172 } 173 174 else if ('move' == $action) 168 175 { 169 176 move_images_to_categories($collection, array($_POST['move'])); … … 176 183 if ('no_album' == $page['prefilter']) 177 184 { 178 redirect($redirect_url);179 } 180 181 if ('no_virtual_album' == $page['prefilter'])185 $redirect = true; 186 } 187 188 else if ('no_virtual_album' == $page['prefilter']) 182 189 { 183 190 $category_info = get_cat_info($_POST['move']); 184 191 if (empty($category_info['dir'])) 185 192 { 186 redirect($redirect_url);187 } 188 } 189 190 if (isset($_SESSION['bulk_manager_filter']['category'])193 $redirect = true; 194 } 195 } 196 197 else if (isset($_SESSION['bulk_manager_filter']['category']) 191 198 and $_POST['move'] != $_SESSION['bulk_manager_filter']['category']) 192 199 { 193 redirect($redirect_url);194 } 195 } 196 197 if ('dissociate' == $action)200 $redirect = true; 201 } 202 } 203 204 else if ('dissociate' == $action) 198 205 { 199 206 // physical links must not be broken, so we must first retrieve image_id … … 227 234 228 235 // let's refresh the page because the current set might be modified 229 redirect($redirect_url);236 $redirect = true; 230 237 } 231 238 } 232 239 233 240 // author 234 if ('author' == $action)241 else if ('author' == $action) 235 242 { 236 243 if (isset($_POST['remove_author'])) … … 256 263 257 264 // title 258 if ('title' == $action)265 else if ('title' == $action) 259 266 { 260 267 if (isset($_POST['remove_title'])) … … 280 287 281 288 // date_creation 282 if ('date_creation' == $action)289 else if ('date_creation' == $action) 283 290 { 284 291 if (isset($_POST['remove_date_creation']) || empty($_POST['date_creation'])) … … 308 315 309 316 // privacy_level 310 if ('level' == $action)317 else if ('level' == $action) 311 318 { 312 319 $datas = array(); … … 329 336 if ($_POST['level'] < $_SESSION['bulk_manager_filter']['level']) 330 337 { 331 redirect($redirect_url);338 $redirect = true; 332 339 } 333 340 } … … 335 342 336 343 // add_to_caddie 337 if ('add_to_caddie' == $action)344 else if ('add_to_caddie' == $action) 338 345 { 339 346 fill_caddie($collection); … … 341 348 342 349 // delete 343 if ('delete' == $action)350 else if ('delete' == $action) 344 351 { 345 352 if (isset($_POST['confirm_deletion']) and 1 == $_POST['confirm_deletion']) … … 354 361 355 362 $redirect_url = get_root_url().'admin.php?page='.$_GET['page']; 356 redirect($redirect_url);363 $redirect = true; 357 364 } 358 365 else … … 368 375 369 376 // synchronize metadata 370 if ('metadata' == $action)377 else if ('metadata' == $action) 371 378 { 372 379 sync_metadata($collection); … … 374 381 } 375 382 376 if ('delete_derivatives' == $action && !empty($_POST['del_derivatives_type']))383 else if ('delete_derivatives' == $action && !empty($_POST['del_derivatives_type'])) 377 384 { 378 385 $query='SELECT path,representative_ext FROM '.IMAGES_TABLE.' … … 388 395 } 389 396 390 if ('generate_derivatives' == $action)397 else if ('generate_derivatives' == $action) 391 398 { 392 399 if ($_POST['regenerateSuccess'] != '0') … … 406 413 407 414 trigger_notify('element_set_global_action', $action, $collection); 415 416 if ($redirect) 417 { 418 redirect($redirect_url); 419 } 408 420 } 409 421
Note: See TracChangeset
for help on using the changeset viewer.