]> git.mjollnir.org Git - moodle.git/commitdiff
Missing addslashes. Merged from MOODLE_17_STABLE.
authortjhunt <tjhunt>
Thu, 19 Oct 2006 10:24:04 +0000 (10:24 +0000)
committertjhunt <tjhunt>
Thu, 19 Oct 2006 10:24:04 +0000 (10:24 +0000)
backup/restorelib.php

index a64809bafe98f431e645e62966dc2c90c9d1f941..ff930389d42b48946509b5d61ada4adb072c957b 100644 (file)
                 if ($categories) {
                     foreach ($categories as $category) {
                         $restoredcategory = get_record('question_categories','id',$category->new_id);
+                        $restoredcategory = addslashes_object($restoredcategory);
                         if ($restoredcategory->parent != 0) {
-                            //echo 'Parent '.$restoredcategory->parent.' is ';           //Debug
                             $idcat = backup_getid($restore->backup_unique_code,'question_categories',$restoredcategory->parent);
                             if ($idcat->new_id) {
                                 $restoredcategory->parent = $idcat->new_id;
                             } else {
                                 $restoredcategory->parent = 0;
                             }
-                            //echo $restoredcategory->parent.' now<br />';  //Debug
                             update_record('question_categories', $restoredcategory);
                         }
                     }