Stephen Ficklin 7 ani în urmă
părinte
comite
74783f8f63

+ 1 - 1
tripal/includes/tripal.importer.inc

@@ -35,6 +35,7 @@ function tripal_get_importer_form($form, &$form_state, $class) {
         'then the status will quickly update to "Complete".',
         'then the status will quickly update to "Complete".',
       '#usage_type' => 'tripal_importer',
       '#usage_type' => 'tripal_importer',
       '#usage_id' => 0,
       '#usage_id' => 0,
+      '#allowed_types' => $class::$file_types,
     );
     );
   }
   }
 
 
@@ -77,7 +78,6 @@ function tripal_get_importer_form($form, &$form_state, $class) {
     );
     );
   }
   }
 
 
-
   $importer = new $class();
   $importer = new $class();
   $element = array();
   $element = array();
   $form['class_elements'] = $importer->form($element, $form_state);
   $form['class_elements'] = $importer->form($element, $form_state);

+ 2 - 2
tripal/includes/tripal.upload.inc

@@ -47,7 +47,7 @@ function tripal_file_upload($type, $filename, $action = NULL, $chunk = 0) {
       tripal_file_upload_put($filename, $chunk, $user_dir);
       tripal_file_upload_put($filename, $chunk, $user_dir);
       break;
       break;
     case 'check':
     case 'check':
-      tripal_file_upload_check($filename, $chunk, $user_dir);
+      tripal_file_upload_verify($filename, $chunk, $user_dir);
       break;
       break;
     case 'merge':
     case 'merge':
       tripal_file_upload_merge($filename, $type, $user_dir);
       tripal_file_upload_merge($filename, $type, $user_dir);
@@ -171,7 +171,7 @@ function tripal_file_upload_merge($filename, $type, $user_dir) {
  *   returns a JSON array with a status, message and the
  *   returns a JSON array with a status, message and the
  *   current chunk.
  *   current chunk.
  */
  */
-function tripal_file_upload_check($filename, $chunk, $user_dir) {
+function tripal_file_upload_verify($filename, $chunk, $user_dir) {
 
 
   $chunk_size = $_GET['chunk_size'];
   $chunk_size = $_GET['chunk_size'];
 
 

+ 2 - 2
tripal_chado/includes/TripalImporter/GFF3Importer.inc

@@ -23,14 +23,14 @@ class GFF3Importer extends TripalImporter {
   /**
   /**
    * An array containing the extensions of allowed file types.
    * An array containing the extensions of allowed file types.
    */
    */
-  public static $file_types = array('gff3');
+  public static $file_types = array('gff', 'gff3');
 
 
 
 
   /**
   /**
    * Provides information to the user about the file upload.  Typically this
    * Provides information to the user about the file upload.  Typically this
    * may include a description of the file types allowed.
    * may include a description of the file types allowed.
    */
    */
-  public static $upload_description = 'Please provide the GFF3 file. The file must have a .gff3 extension.';
+  public static $upload_description = 'Please provide the GFF3 file.';
 
 
   /**
   /**
    * The title that should appear above the upload button.
    * The title that should appear above the upload button.