mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 00:16:46 +02:00
user MDL-19825 Converted get_record to use DB object
This commit is contained in:
parent
5633445f59
commit
81e3e1555e
1 changed files with 1 additions and 1 deletions
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue