From: Sam Hemelryk Date: Mon, 7 Dec 2009 06:13:09 +0000 (+0000) Subject: user MDL-19825 Converted get_record to use DB object X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=81e3e1555e35df9db0b64b2290cb75787f20d704;p=moodle.git user MDL-19825 Converted get_record to use DB object --- diff --git a/user/profile/index_category_form.php b/user/profile/index_category_form.php index e4ab710aa3..0be8ac9987 100644 --- a/user/profile/index_category_form.php +++ b/user/profile/index_category_form.php @@ -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)); }