]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-18542:
authorthepurpleblob <thepurpleblob>
Tue, 24 Mar 2009 11:12:33 +0000 (11:12 +0000)
committerthepurpleblob <thepurpleblob>
Tue, 24 Mar 2009 11:12:33 +0000 (11:12 +0000)
Just noticed a couple of oddnesses in the diff.....

mod/data/edit.php
mod/data/lib.php

index 84609ff288ba76a23c0b3f84d1b95231192784ff..eb8262ec8f842b8963707c2e287de135b450e101 100755 (executable)
 
         $ignorenames = array('MAX_FILE_SIZE','sesskey','d','rid','saveandview','cancel');  // strings to be ignored in input data
 
-        $ignorenames = array('MAX_FILE_SIZE','sesskey','d','rid','saveandview','cancel');  // strings to be ignored in input data
-
-        $ignorenames = array('MAX_FILE_SIZE','sesskey','d','rid','saveandview','cancel');  // strings to be ignored in input data
-
         if ($rid) {                                          /// Update some records
 
             /// All student edits are marked unapproved by default
index eb7835e78993adf37e188e056e5e98c187ce6f4c..a36e251bcc724af7c56318c331ffa290b58c1695 100755 (executable)
@@ -193,6 +193,11 @@ class data_field_base {     // Base class for Database Field Types (see field/*/
             $content = '';
         }
 
+        // beware get_field returns false for new, empty records MDL-18567
+        if ($content===false) {
+            $content='';
+        }
+
         $str = '<div title="'.s($this->field->description).'">';
         $str .= '<input style="width:300px;" type="text" name="field_'.$this->field->id.'" id="field_'.$this->field->id.'" value="'.s($content).'" />';
         $str .= '</div>';