Browse Source

Fixing move form

Julio Montoya 12 years ago
parent
commit
f9e7bd9bfd
2 changed files with 3 additions and 3 deletions
  1. 2 2
      main/dropbox/dropbox_functions.inc.php
  2. 1 1
      main/dropbox/index.php

+ 2 - 2
main/dropbox/dropbox_functions.inc.php

@@ -196,11 +196,11 @@ function display_move_form($part, $id, $target = array(), $extra_params = array(
 * @version march 2006
 */
 function store_move($id, $target, $part) {
-	global $_user;
-	global $dropbox_cnf;
+	global $_user, $dropbox_cnf;
     $course_id = api_get_course_int_id();
 
 	if ((isset($id) AND $id != '') AND (isset($target) AND $target != '') AND (isset($part) AND $part != '')) {
+        
 		if ($part == 'received') {
 			$sql = "UPDATE ".$dropbox_cnf["tbl_post"]." SET cat_id='".Database::escape_string($target)."'
 						WHERE c_id = $course_id AND dest_user_id='".Database::escape_string($_user['user_id'])."'

+ 1 - 1
main/dropbox/index.php

@@ -193,7 +193,7 @@ if (($action == 'movesent' OR $action == 'movereceived') AND isset($_GET['move_i
 	}
 	display_move_form(str_replace('move', '', $action), $_GET['move_id'], get_dropbox_categories(str_replace('move', '', $action)), $sort_params);
 }
-if (isset($_POST['do_move']) && $_POST['do_move']) {
+if (isset($_POST['do_move'])) {
 	Display :: display_confirmation_message(store_move($_POST['id'], $_POST['move_target'], $_POST['part']));
 }