mirror of
https://github.com/moodle/moodle.git
synced 2025-08-03 16:13:28 +02:00
MDL-14679 converted some insert_records()
This commit is contained in:
parent
50c5bef452
commit
1829e015e6
6 changed files with 13 additions and 12 deletions
|
@ -97,11 +97,11 @@ admin_externalpage_print_header();
|
|||
print_heading(get_string('profilefields', 'admin'));
|
||||
|
||||
/// Check that we have at least one category defined
|
||||
if (count_records('user_info_category') == 0) {
|
||||
if ($DB->count_records('user_info_category') == 0) {
|
||||
$defaultcategory = new object();
|
||||
$defaultcategory->name = $strdefaultcategory;
|
||||
$defaultcategory->sortorder = 1;
|
||||
insert_record('user_info_category', $defaultcategory);
|
||||
$DB->insert_record('user_info_category', $defaultcategory);
|
||||
redirect($redirect);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue