]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-16099: database migration on user/profil/field/checkbox/field.class.php
authorjerome <jerome>
Mon, 18 Aug 2008 07:25:09 +0000 (07:25 +0000)
committerjerome <jerome>
Mon, 18 Aug 2008 07:25:09 +0000 (07:25 +0000)
user/profile/field/checkbox/field.class.php

index 09989a40fdcea63ff9440b276813c19eea1a6d6c..ec09b8c1af57b5b4e508179e823063630ccafcee 100644 (file)
@@ -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 {