MDL-8913 use proper returned reference assignment for forms elements (PHP4 trouble); merged from MOODLE_18_STABLE
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
+1
-1
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user