From: ikawhero Date: Thu, 20 Mar 2008 09:16:23 +0000 (+0000) Subject: Fixed typo that was affecting the reordering of custom profile fields. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=258db59a44d409c5753765496573550232ed88c3;p=moodle.git Fixed typo that was affecting the reordering of custom profile fields. MDL-13909. --- diff --git a/user/profile/definelib.php b/user/profile/definelib.php index 937cdd4a96..1b889c6208 100644 --- a/user/profile/definelib.php +++ b/user/profile/definelib.php @@ -185,12 +185,12 @@ class profile_define_base { */ function profile_reorder_fields() { if ($categories = get_records_select('user_info_category')) { - $i = 1; foreach ($categories as $category) { + $i = 1; if ($fields = get_records_select('user_info_field', 'categoryid='.$category->id, 'sortorder ASC')) { foreach ($fields as $field) { $f = new object(); - $f->if = $field->id; + $f->id = $field->id; $f->sortorder = $i++; update_record('user_info_field', $f); }