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

Fixed installer so it should work with a chado schema within Drupal database or separate

spficklin 12 éve
szülő
commit
9d1ce22fcd
1 módosított fájl, 6 hozzáadás és 0 törlés
  1. 6 0
      tripal_core/includes/chado_install.php

+ 6 - 0
tripal_core/includes/chado_install.php

@@ -350,7 +350,13 @@ function tripal_core_install_sql($sql_file) {
         $query = preg_replace("/public/m", "chado", $query);
       }
       
+      if (!$chado_local) {
+        $previous = tripal_core_db_set_active('chado');
+      }
       $result = db_query($query);
+      if (!$chado_local) {
+        tripal_core_db_set_active($previous);
+      }
       if (!$result) {
         $error  = pg_last_error();
         print "FAILED!!\nError Message:\nSQL $i, $in_string: $query\n$error\n";