Index: trunk/admin/batch_manager_global.php
===================================================================
--- trunk/admin/batch_manager_global.php	(revision 13063)
+++ trunk/admin/batch_manager_global.php	(revision 13064)
@@ -45,4 +45,5 @@
 check_input_parameter('del_tags', $_POST, true, PATTERN_ID);
 check_input_parameter('associate', $_POST, false, PATTERN_ID);
+check_input_parameter('move', $_POST, false, PATTERN_ID);
 check_input_parameter('dissociate', $_POST, false, PATTERN_ID);
 
@@ -174,4 +175,47 @@
         redirect($redirect_url);
       }
+    }
+  }
+
+  if ('move' == $action)
+  {
+    // let's first break links with all albums but their "storage album"
+    $query = '
+DELETE '.IMAGE_CATEGORY_TABLE.'.*
+  FROM '.IMAGE_CATEGORY_TABLE.'
+    JOIN '.IMAGES_TABLE.' ON image_id=id
+  WHERE id IN ('.implode(',', $collection).')
+    AND (storage_category_id IS NULL OR storage_category_id != category_id)
+;';
+    pwg_query($query);
+    
+    associate_images_to_categories(
+      $collection,
+      array($_POST['move'])
+      );
+
+    $_SESSION['page_infos'] = array(
+      l10n('Information data registered in database')
+      );
+    
+    // let's refresh the page because we the current set might be modified
+    if ('with no album' == $page['prefilter'])
+    {
+      redirect($redirect_url);
+    }
+
+    if ('with no virtual album' == $page['prefilter'])
+    {
+      $category_info = get_cat_info($_POST['move']);
+      if (empty($category_info['dir']))
+      {
+        redirect($redirect_url);
+      }
+    }
+
+    if (isset($_SESSION['bulk_manager_filter']['category'])
+        and $_POST['move'] != $_SESSION['bulk_manager_filter']['category'])
+    {
+      redirect($redirect_url);
     }
   }
@@ -204,11 +248,9 @@
       pwg_query($query);
 
-      update_category($_POST['dissociate']);
-      
       $_SESSION['page_infos'] = array(
         l10n('Information data registered in database')
         );
       
-      // let's refresh the page because we the current set might be modified
+      // let's refresh the page because the current set might be modified
       redirect($redirect_url);
     }
@@ -529,4 +571,5 @@
 ;';
 display_select_cat_wrapper($query, array(), 'associate_options', true);
+display_select_cat_wrapper($query, array(), 'move_options', true);
 display_select_cat_wrapper($query, array(), 'category_parent_options');
 
Index: trunk/admin/themes/default/template/batch_manager_global.tpl
===================================================================
--- trunk/admin/themes/default/template/batch_manager_global.tpl	(revision 13063)
+++ trunk/admin/themes/default/template/batch_manager_global.tpl	(revision 13064)
@@ -195,4 +195,11 @@
     $("#action_"+$(this).attr("value")).show();
 
+    /* make sure the #albumSelect is on the right select box so that the */
+    /* "add new album" popup fills the right select box                  */
+    if ("associate" == $(this).attr("value") || "move" == $(this).attr("value")) {
+      jQuery("#albumSelect").removeAttr("id");
+      jQuery("#action_"+$(this).attr("value")+" select").attr("id", "albumSelect");
+    }
+
     if ($(this).val() != -1) {
       $("#applyActionBlock").show();
@@ -613,4 +620,5 @@
   {/if}
       <option value="associate">{'Associate to album'|@translate}</option>
+      <option value="move">{'Move to album'|@translate}</option>
   {if !empty($dissociate_options)}
       <option value="dissociate">{'Dissociate from album'|@translate}</option>
@@ -646,9 +654,18 @@
     <!-- associate -->
     <div id="action_associate" class="bulkAction">
-          <select id="albumSelect" style="width:400px" name="associate" size="1">
+          <select style="width:400px" name="associate" size="1">
             {html_options options=$associate_options }
          </select>
 <br>{'... or '|@translate}</span><a href="#" class="addAlbumOpen" title="{'create a new album'|@translate}">{'create a new album'|@translate}</a>
     </div>
+
+    <!-- move -->
+    <div id="action_move" class="bulkAction">
+          <select style="width:400px" name="move" size="1">
+            {html_options options=$move_options }
+         </select>
+<br>{'... or '|@translate}</span><a href="#" class="addAlbumOpen" title="{'create a new album'|@translate}">{'create a new album'|@translate}</a>
+    </div>
+
 
     <!-- dissociate -->
