Forráskód Böngészése

added fclose to file_upload_combo, and added form_state variable to ahah_prepare_form function

spficklin 11 éve
szülő
commit
1f8e28c555

+ 2 - 2
tripal_core/api/tripal_core_ahah.api.inc

@@ -48,10 +48,10 @@ function tripal_core_ahah_init_form() {
  *
  * @ingroup tripal_ahah_api
  */
-function tripal_core_ahah_prepare_form() {
+function tripal_core_ahah_prepare_form(&$form_state = array()) {
   
   // Retrieve the form from the cache
-  $form_state = array('storage' => NULL);
+  $form_state['storage'] = NULL;
   $form_build_id = filter_xss($_POST['form_build_id']);
   if (!$form_build_id) {
     return FALSE;

+ 2 - 1
tripal_core/includes/form_elements.inc

@@ -117,7 +117,8 @@ function file_upload_combo_validate($element, &$form) {
       foreach ($vals as $i => $value) {
         $values[] = trim($value);
       }
-    }       
+    }
+    fclose($fh);       
   }
   
   // add a new 'items_array' element that contains the array of