]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-8913 use proper returned reference assignment for forms elements (PHP4 trouble...
authorskodak <skodak>
Thu, 15 Mar 2007 12:42:39 +0000 (12:42 +0000)
committerskodak <skodak>
Thu, 15 Mar 2007 12:42:39 +0000 (12:42 +0000)
question/type/calculated/edit_calculated_form.php
question/type/numerical/edit_numerical_form.php
user/edit_form.php
user/editadvanced_form.php

index 1dea97645d8daaf815e20b7d1bcfcb171a7d84dc..7f534c196e16ceb26ee077a645277c73f5d7ddaa 100644 (file)
@@ -114,7 +114,7 @@ class question_edit_calculated_form extends question_edit_form {
         $repeatsatstart = $countunits + 1;
         $this->repeat_elements($repeated, $repeatsatstart, array(), 'nounits', 'addunits', 2, get_string('addmoreunitblanks', 'qtype_calculated', '{no}'));
 
-        $firstunit = $mform->getElement('multiplier[0]');
+        $firstunit =& $mform->getElement('multiplier[0]');
         $firstunit->freeze();
         $firstunit->setValue('1.0');
         $firstunit->setPersistantFreeze(true);
index 8b06ec837172f026d925825c5446b4125c241aeb..4988b52208929b959371fa0ed44b99d691a13ff1 100644 (file)
@@ -67,7 +67,7 @@ class question_edit_numerical_form extends question_edit_form {
         $repeatsatstart = $countunits + 2;
         $this->repeat_elements($repeated, $repeatsatstart, array(), 'nounits', 'addunits', 2, get_string('addmoreunitblanks', 'qtype_numerical'));
 
-        $firstunit = $mform->getElement('multiplier[0]');
+        $firstunit =& $mform->getElement('multiplier[0]');
         $firstunit->freeze();
         $firstunit->setValue('1.0');
         $firstunit->setPersistantFreeze(true);
index 00cc480cbccf9100bddd7dc88af4ee5096d32e4f..e0941dc1be0efac059a10232500a9f195fb18c52 100644 (file)
@@ -46,7 +46,7 @@ class user_edit_form extends moodleform {
 
             // print picture
             if (!empty($CFG->gdversion)) {
-                $image_el = $mform->getElement('currentpicture');
+                $image_el =& $mform->getElement('currentpicture');
                 if ($user and $user->picture) {
                     $image_el->setValue(print_user_picture($user->id, SITEID, $user->picture, 64,true,false,'',true));
                 } else {
index ef5ebe742571dcce4ab3e4e1e6aa87a19dda1fb1..d23aa8b6e8987ecf1a9035eeff9670d2d144cafa 100644 (file)
@@ -65,7 +65,7 @@ class user_editadvanced_form extends moodleform {
         if (!empty($USER->newadminuser)) {
             $mform->addRule('newpassword', get_string('required'), 'required', null, 'client');
 
-            $email_el = $mform->getElement('email');
+            $email_el =& $mform->getElement('email');
             if ($email_el->getValue() == 'root@localhost') {
                 $email_el->setValue('');
             }
@@ -78,7 +78,7 @@ class user_editadvanced_form extends moodleform {
 
         // print picture
         if (!empty($CFG->gdversion)) {
-            $image_el = $mform->getElement('currentpicture');
+            $image_el =& $mform->getElement('currentpicture');
             if ($user and $user->picture) {
                 $image_el->setValue(print_user_picture($user->id, SITEID, $user->picture, 64, true, false, '', true));
             } else {