Fixed typo that was affecting the reordering of custom profile fields.

MDL-13909.
This commit is contained in:
ikawhero 2008-03-20 09:16:23 +00:00
parent c7a7112781
commit 258db59a44

View File

@ -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);
}