From: ikawhero Date: Thu, 19 Apr 2007 07:42:40 +0000 (+0000) Subject: Merged changes from stable. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c3af90961c2bb5f9699ad26c46f80c1a5bcf3833;p=moodle.git Merged changes from stable. Fixed typo. Made constructor variables optional to reflect parent class --- diff --git a/user/profile/field/menu/field.class.php b/user/profile/field/menu/field.class.php index 98780d84ee..c360b2ad95 100644 --- a/user/profile/field/menu/field.class.php +++ b/user/profile/field/menu/field.class.php @@ -9,7 +9,7 @@ class profile_field_menu extends profile_field_base { * Pulls out the options for the menu from the database and sets the * the corresponding key for the data if it exists */ - function profile_field_menu($fieldid, $userid) { + function profile_field_menu($fieldid=0, $userid=0) { //first call parent constructor $this->profile_field_base($fieldid, $userid); @@ -40,7 +40,7 @@ class profile_field_menu extends profile_field_base { * Overwrites the base class method */ function edit_field_set_default(&$mform) { - $defaultkey = (int)array_search($field->defaultdata, $this->options); + $defaultkey = (int)array_search($this->field->defaultdata, $this->options); $mform->setDefault($this->inputname, $defaultkey); }