- Timestamp:
- Feb 9, 2012, 11:16:56 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 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 -
trunk/admin/themes/default/template/batch_manager_global.tpl
r13063 r13064 195 195 $("#action_"+$(this).attr("value")).show(); 196 196 197 /* make sure the #albumSelect is on the right select box so that the */ 198 /* "add new album" popup fills the right select box */ 199 if ("associate" == $(this).attr("value") || "move" == $(this).attr("value")) { 200 jQuery("#albumSelect").removeAttr("id"); 201 jQuery("#action_"+$(this).attr("value")+" select").attr("id", "albumSelect"); 202 } 203 197 204 if ($(this).val() != -1) { 198 205 $("#applyActionBlock").show(); … … 613 620 {/if} 614 621 <option value="associate">{'Associate to album'|@translate}</option> 622 <option value="move">{'Move to album'|@translate}</option> 615 623 {if !empty($dissociate_options)} 616 624 <option value="dissociate">{'Dissociate from album'|@translate}</option> … … 646 654 <!-- associate --> 647 655 <div id="action_associate" class="bulkAction"> 648 <select id="albumSelect"style="width:400px" name="associate" size="1">656 <select style="width:400px" name="associate" size="1"> 649 657 {html_options options=$associate_options } 650 658 </select> 651 659 <br>{'... or '|@translate}</span><a href="#" class="addAlbumOpen" title="{'create a new album'|@translate}">{'create a new album'|@translate}</a> 652 660 </div> 661 662 <!-- move --> 663 <div id="action_move" class="bulkAction"> 664 <select style="width:400px" name="move" size="1"> 665 {html_options options=$move_options } 666 </select> 667 <br>{'... or '|@translate}</span><a href="#" class="addAlbumOpen" title="{'create a new album'|@translate}">{'create a new album'|@translate}</a> 668 </div> 669 653 670 654 671 <!-- dissociate --> -
trunk/language/en_UK/admin.lang.php
r13013 r13064 847 847 $lang['This album contains %d photos, added between %s and %s.'] = 'This album contains %d photos, added between %s and %s.'; 848 848 $lang['This album contains no photo.'] = 'This album contains no photo.'; 849 $lang['Move to album'] = 'Move to album'; 849 850 ?> -
trunk/language/fr_FR/admin.lang.php
r13041 r13064 847 847 $lang['This album contains no photo.'] = 'Cet album ne contient pas de photo.'; 848 848 $lang['%s has been successfully updated.'] = '%s a été mis à jour avec succès.'; 849 $lang['Move to album'] = 'Déplacer vers l\'album'; 849 850 ?>
Note: See TracChangeset
for help on using the changeset viewer.