From: fiedorow Date: Tue, 6 Jan 2004 20:25:12 +0000 (+0000) Subject: Fixed bug in setting optionalDefaults outside the main loop X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=748fd535fe6a74d357e3c7be1fa53e1f4bbf0133;p=moodle.git Fixed bug in setting optionalDefaults outside the main loop --- diff --git a/admin/uploaduser.php b/admin/uploaduser.php index dad874044b..1b2db12db8 100755 --- a/admin/uploaduser.php +++ b/admin/uploaduser.php @@ -111,12 +111,11 @@ } $linenum = 2; // since header is line 1 - foreach ($optionalDefaults as $key => $value) { - $user->$key = $adminuser->$key; - } - while (!feof ($fp)) { - //Note: commas within a field should be encoded as , + foreach ($optionalDefaults as $key => $value) { + $user->$key = $adminuser->$key; + } + //Note: commas within a field should be encoded as , $line = split("\,", fgets($fp,1024)); foreach ($line as $key => $value) { //decode encoded commas