]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed extra function argument in call for display_add_field() from add.php.
authorvyshane <vyshane>
Thu, 23 Mar 2006 06:20:48 +0000 (06:20 +0000)
committervyshane <vyshane>
Thu, 23 Mar 2006 06:20:48 +0000 (06:20 +0000)
mod/data/add.php
mod/data/lib.php

index 4118576244fed0a782e99c2306c8de98813ccdb6..e332a4bc29c14cc6370e4cc6c6907937e1cc3349 100755 (executable)
                 //for each field in the add form, add it to the data_content.
                 foreach ($datarecord as $name => $value){
                     if (!in_array($name, $ignorenames)) {
-                        $namearr = explode('_',$name);  // Second one is the field id
+                        $namearr = explode('_', $name);  // Second one is the field id
                         if (empty($field->field) || ($namearr[1] != $field->field->id)) {  // Try to reuse classes
                             $field = data_get_field_from_id($namearr[1], $data);
                         }
     if (!$rid){
         print_heading(get_string('newentry','data'), '', 2);
     }
-    
+        
     /******************************************
      * Regular expression replacement section *
      ******************************************/
index e73f5ca13fed39192cefd1a3ca65c7351c662959..0c6cf2f9b61dc65cb3fb71923624571cc7116a60 100755 (executable)
@@ -360,7 +360,6 @@ function data_generate_default_form($dataid, $mode){
  * output: null                                          *
  *********************************************************/
 function data_generate_empty_add_form($id, $rid=0){
-
     $currentdata = get_record('data','id',$id);
     //check if there is an add entry
     if (!$currentdata->addtemplate){
@@ -383,7 +382,7 @@ function data_generate_empty_add_form($id, $rid=0){
 
                 $str .='<td valign="top">';
                 $g = data_get_field($cfield, $currentdata);
-                $str .= $g->display_add_field($cfield->id,$rid);
+                $str .= $g->display_add_field($rid);
                 $str .= '</td>';
                 $str .= '</tr>';
                 unset($g);
@@ -393,7 +392,6 @@ function data_generate_empty_add_form($id, $rid=0){
             $str .= '</div>';
 
         }
-
         echo $str;
     }
 }