Index: admin/categories.php
===================================================================
--- admin/categories.php	(revision 1525)
+++ admin/categories.php	(revision 1531)
@@ -17,22 +17,39 @@
 # Remove a categories
 if (!empty($_POST['categories'])) {
-	$error = false;
-	foreach ($_POST['categories'] as $cat_id) {
-		# Check if category to delete exists
-		$c = $core->blog->getCategory((integer) $cat_id);
-		if ($c->isEmpty()) {
-			continue;
+	try {
+		# Check if category where to move posts exists
+		$mov_cat = (int) $_POST['mov_cat'];
+		$mov_cat = $mov_cat ? $mov_cat : null;
+		if ($mov_cat !== null) {
+			$c = $core->blog->getCategory($mov_cat);
+			if ($c->isEmpty()) {
+				throw new Exception(__('Category where to move posts does not exist'));
+			}
+			unset($c);
+
+			if (in_array($mov_cat, $_POST['categories'])) {
+				throw new Exception(__('The entries cannot be moved to the category you choose to delete.'));
+			}
 		}
-		unset($c);
 
-		try {
+		foreach ($_POST['categories'] as $cat_id) {
+			# Check if category to delete exists
+			$c = $core->blog->getCategory((integer) $cat_id);
+			if ($c->isEmpty()) {
+				continue;
+			}
+			unset($c);
+
+			# Move posts
+			if ($mov_cat != $cat_id) {
+			        $core->blog->changePostsCategory($cat_id,$mov_cat);
+			}
+
 			# Delete category
 			$core->blog->delCategory($cat_id);
-		} catch (Exception $e) {
-			$error = true;
 		}
-	}
-	if (!$error) {
 		http::redirect('categories.php?del='.count($_POST['categories']));
+	} catch (Exception $e) {
+		$core->error->add($e->getMessage());
 	}
 }
@@ -58,7 +75,4 @@
 }
 
-# --BEHAVIOR-- adminCategoriesActionsCombo
-$core->callBehavior('adminCategoriesActionsCombo',array(&$combo_action));
-
 
 /* Display
@@ -74,19 +88,13 @@
 );
 
-if (!empty($_GET['add'])) {
-	dcPage::message(__('The category has been successfully created.'));
-}
 if (!empty($_GET['del'])) {
-  dcPage::message(__('The category has been successfully removed.',
-		     'The categories have been successfully removed.',
-		     (int) $_GET['del']
-		     )
-		  );
+        dcPage::message(__('The category has been successfully removed.',
+			   'The categories have been successfully removed.',
+			   (int) $_GET['del']
+			   )
+			);
 }
 if (!empty($_GET['reord'])) {
 	dcPage::message(__('Categories have been successfully reordered.'));
-}
-if (!empty($_GET['moved'])) {
-	dcPage::message(__('The category has been successfully moved.'));
 }
 
@@ -139,10 +147,6 @@
 
 		echo
-		'<p>';
-		if ($rs->nb_total == 0) {
-			echo form::checkbox(array('categories[]'),$rs->cat_id);
-		}
-
-		echo
+		'<p>'.
+		form::checkbox(array('categories[]'),$rs->cat_id).
 		'<strong><a href="category.php?id='.$rs->cat_id.'">'.html::escapeHTML($rs->cat_title).'</a></strong>'.
 		' (<a href="posts.php?cat_id='.$rs->cat_id.'">'.
@@ -164,4 +168,6 @@
 		 '<div class="two-cols">'.
 		 '<p class="col checkboxes-helpers"></p>'.
+		 '<p class="col right"><label for="mov_cat">'.__('And choose the category which will receive its entries:').'</label> '.
+		 form::combo('mov_cat',array_merge(array(__('(No cat)') => ''),$categories_combo),'','maximal').'</p> '.
 		 '<p class="col right"><label for="action" class="classic">'.__('Selected categories action:').'</label> '.
 		 form::combo('action',$combo_action).
Index: admin/index.php
===================================================================
--- admin/index.php	(revision 1530)
+++ admin/index.php	(revision 1529)
@@ -340,4 +340,5 @@
 			? '<div>'.
 			'<p id="new_cat" class="q-cat">'.__('Add a new category').'</p>'.
+			'<p class="form-note info clear">'.__('This category will be created when you will save your post.').'</p>'.
 			'<p class="q-cat"><label for="new_cat_title">'.__('Title:').'</label> '.
 			form::field('new_cat_title',30,255,'','').'</p>'.
@@ -345,5 +346,4 @@
 			form::combo('new_cat_parent',$categories_combo,'','').
 			'</p>'.
-			'<p class="form-note info clear">'.__('This category will be created when you will save your post.').'</p>'.
 			'</div>'
 			: '').
Index: admin/js/_categories.js
===================================================================
--- admin/js/_categories.js	(revision 1525)
+++ admin/js/_categories.js	(revision 1531)
@@ -3,4 +3,10 @@
 	$('.checkboxes-helpers').each(function() {
 		dotclear.checkboxesHelpers(this);
+	});
+
+	$('#mov_cat').parent().hide();
+	$('input[name="categories[]"]').click(function() {
+		$('#mov_cat').parent().parent().removeClass('two-cols').addClass('three-cols');
+		$('#mov_cat').parent().show();
 	});
 
Index: admin/js/_post.js
===================================================================
--- admin/js/_post.js	(revision 1530)
+++ admin/js/_post.js	(revision 1529)
@@ -124,6 +124,6 @@
 		        legend_click: true
 		});
-		$('#create_cat').toggleWithLegend(
-			$('#create_cat').parent().children().not('#create_cat'),
+		$('#new_cat').toggleWithLegend(
+			$('#new_cat').parent().children().not('#new_cat'),
 			{legend_click: true} // no cookie on new category as we don't use this every day
 		);
Index: admin/post.php
===================================================================
--- admin/post.php	(revision 1530)
+++ admin/post.php	(revision 1529)
@@ -458,5 +458,5 @@
 					($core->auth->check('categories', $core->blog->id) ?
 						'<div>'.
-						'<h5 id="create_cat">'.__('Add a new category').'</h5>'.
+						'<p id="new_cat">'.__('Add a new category').'</p>'.
 						'<p><label for="new_cat_title">'.__('Title:').' '.
 						form::field('new_cat_title',30,255,'','maximal').'</label></p>'.
