]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed typo that was affecting the reordering of custom profile fields.
authorikawhero <ikawhero>
Thu, 20 Mar 2008 09:16:23 +0000 (09:16 +0000)
committerikawhero <ikawhero>
Thu, 20 Mar 2008 09:16:23 +0000 (09:16 +0000)
MDL-13909.

user/profile/definelib.php

index 937cdd4a96f2654d4e922ebc1d414aa3294ed580..1b889c620807bd4e0158b936bda750e38390d7c5 100644 (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);
                 }