Pārlūkot izejas kodu

Merge pull request #79 from tripal/78-undefinedvar

Remove unused default.
Lacey-Anne Sanderson 5 gadi atpakaļ
vecāks
revīzija
0ca2995559
2 mainītis faili ar 4 papildinājumiem un 3 dzēšanām
  1. 1 1
      .travis.yml
  2. 3 2
      includes/blast_ui.form_per_program.inc

+ 1 - 1
.travis.yml

@@ -24,7 +24,7 @@ after_script:
   - ./cc-test-reporter after-build clover.xml --debug -t clover -p /var/www/html/sites/all/modules/custom/tripal_blast --exit-code $TRAVIS_TEST_RESULT
 script:
   - docker run -it -d --rm --name tripal -v "$(pwd)":/modules/tripal_blast statonlab/tripal3
-  - sleep 30 # We pause here so postgres and apache complete booting up
+  - sleep 45 # We pause here so postgres and apache complete booting up
  #install blast
   - docker exec -it tripal bash -c "cp /modules/tripal_blast/ncbi-blast-2.2.30+/bin/* /usr/local/bin"
   - docker exec -it tripal drush pm-enable -y blast_ui

+ 3 - 2
includes/blast_ui.form_per_program.inc

@@ -251,7 +251,6 @@ function blast_ui_per_blast_program_form($form, $form_state) {
           '%max_size' => round(file_upload_max_size() / 1024 / 1024,1) . 'MB'
         )
       ),
-      '#default_value' => variable_get($db_file_id, ''),
       '#upload_validators' => array(
         'file_validate_extensions' => array('fasta fna fa'),
         'file_validate_size' => array(file_upload_max_size()),
@@ -444,8 +443,10 @@ function blast_ui_per_blast_program_form_submit($form, &$form_state) {
     // NOTE: We can't support subject because we need to generate the ASN.1+ format
     // to provide multiple download type options from the same BLAST
     $blastdb_with_path = $form_state['upDB_path'];
+    $blast_path = variable_get('blast_path', '');
+    $makeblast_db = $blast_path . 'makeblastdb';
     $result = NULL;
-    exec('makeblastdb -in ' . escapeshellarg($blastdb_with_path) . ' -dbtype ' . escapeshellarg($mdb_type) . ' -parse_seqids 2>&1', $result);
+    exec(escapeshellarg($makeblast_db) . ' -in ' . escapeshellarg($blastdb_with_path) . ' -dbtype ' . escapeshellarg($mdb_type) . ' -parse_seqids 2>&1', $result);
 
     // Check that the BLAST database was made correctly.
     $result = implode('<br />', $result);