From: jerome Date: Mon, 18 Aug 2008 07:25:09 +0000 (+0000) Subject: MDL-16099: database migration on user/profil/field/checkbox/field.class.php X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=b587e914f7cfaf99728ca85026d351fe8d8d041b;p=moodle.git MDL-16099: database migration on user/profil/field/checkbox/field.class.php --- diff --git a/user/profile/field/checkbox/field.class.php b/user/profile/field/checkbox/field.class.php index 09989a40fd..ec09b8c1af 100644 --- a/user/profile/field/checkbox/field.class.php +++ b/user/profile/field/checkbox/field.class.php @@ -8,11 +8,12 @@ class profile_field_checkbox extends profile_field_base { * the corresponding key for the data if it exists */ function profile_field_checkbox($fieldid=0, $userid=0) { + global $DB; //first call parent constructor $this->profile_field_base($fieldid, $userid); if (!empty($this->field)) { - $datafield = get_field('user_info_data', 'data', 'userid', $this->userid, 'fieldid', $this->fieldid); + $datafield = $DB->get_field('user_info_data', 'data', array('userid' => $this->userid, 'fieldid' => $this->fieldid)); if ($datafield !== false) { $this->data = $datafield; } else {