From: skodak Date: Thu, 15 Mar 2007 12:42:39 +0000 (+0000) Subject: MDL-8913 use proper returned reference assignment for forms elements (PHP4 trouble... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=b4c46a8b0f87a6c8a658c8fc0399c387ac4c1129;p=moodle.git MDL-8913 use proper returned reference assignment for forms elements (PHP4 trouble); merged from MOODLE_18_STABLE --- diff --git a/question/type/calculated/edit_calculated_form.php b/question/type/calculated/edit_calculated_form.php index 1dea97645d..7f534c196e 100644 --- a/question/type/calculated/edit_calculated_form.php +++ b/question/type/calculated/edit_calculated_form.php @@ -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); diff --git a/question/type/numerical/edit_numerical_form.php b/question/type/numerical/edit_numerical_form.php index 8b06ec8371..4988b52208 100644 --- a/question/type/numerical/edit_numerical_form.php +++ b/question/type/numerical/edit_numerical_form.php @@ -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); diff --git a/user/edit_form.php b/user/edit_form.php index 00cc480cbc..e0941dc1be 100644 --- a/user/edit_form.php +++ b/user/edit_form.php @@ -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 { diff --git a/user/editadvanced_form.php b/user/editadvanced_form.php index ef5ebe7425..d23aa8b6e8 100644 --- a/user/editadvanced_form.php +++ b/user/editadvanced_form.php @@ -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 {