]> git.mjollnir.org Git - moodle.git/commitdiff
user MDL-19825 Converted get_record to use DB object
authorSam Hemelryk <sam@moodle.com>
Mon, 7 Dec 2009 06:13:09 +0000 (06:13 +0000)
committerSam Hemelryk <sam@moodle.com>
Mon, 7 Dec 2009 06:13:09 +0000 (06:13 +0000)
user/profile/index_category_form.php

index e4ab710aa39d2d0beec44551504ba6b1ddf28eb3..0be8ac99876b0a87a028e215b42895e6b99bae5c 100644 (file)
@@ -37,7 +37,7 @@ class category_form extends moodleform {
 
         /// Check the name is unique
         if (!empty($data->id)) { // we are editing an existing record
-            $olddata = get_record('user_info_category', 'id', $data->id);
+            $olddata = $DB->get_record('user_info_category', array('id'=>$data->id));
             // name has changed, new name in use, new name in use by another record
             $dupfound = (($olddata->name !== $data->name) && $duplicate && ($data->id != $duplicate->id));
         }