]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed false course category move when searching courses in editing mode
authorpatrickslee <patrickslee>
Sun, 26 Mar 2006 20:58:54 +0000 (20:58 +0000)
committerpatrickslee <patrickslee>
Sun, 26 Mar 2006 20:58:54 +0000 (20:58 +0000)
course/search.php

index 6c18b0ada2d760d09b450d6e47cdd6bb71daf945..9a10f5d76f68f38ee51b1d5f678509b1064dc5bd 100644 (file)
@@ -8,6 +8,7 @@
     $search  = optional_param('search', '', PARAM_RAW);  // search words
     $page    = optional_param('page', 0, PARAM_INT);     // which page to show
     $perpage = optional_param('perpage', 10, PARAM_INT); // how many per page
+    $moveto  = optional_param('moveto', 0, PARAM_INT);   // move to category
 
     $search = trim(strip_tags($search)); // trim & clean raw searched string
 
         exit;
     }
 
-    if (isset($moveto) and $data = data_submitted() and confirm_sesskey()) {   // Some courses are being moved
+    if (!empty($moveto) and $data = data_submitted() and confirm_sesskey()) {   // Some courses are being moved
     
         if (! $destcategory = get_record("course_categories", "id", $data->moveto)) {
             error("Error finding the category");