Просмотр исходного кода

Fixed bug when preparing to select currval on insert, and debugging of FASTA loader

spficklin 12 лет назад
Родитель
Сommit
6343db78c3
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      tripal_core/api/tripal_core.api.inc
  2. 1 1
      tripal_feature/includes/fasta_loader.inc

+ 1 - 1
tripal_core/api/tripal_core.api.inc

@@ -353,7 +353,7 @@ function tripal_core_chado_insert($table, $values, $options = array()) {
   if ($options['return_record'] == TRUE and $result) {
     if (array_key_exists('primary key', $table_desc) and is_array($table_desc['primary key'])) {
       foreach ($table_desc['primary key'] as $field) {
-        $psql = "PREPARE currval_$table AS SELECT CURRVAL('" . $table . "_" . $field . "_seq')";
+        $psql = "PREPARE currval_" . $table . "_" . $field . " AS SELECT CURRVAL('" . $table . "_" . $field . "_seq')";
         $is_prepared = tripal_core_chado_prepare("currval_$table", $psql, array());
         if ($is_prepared) {
            $value = db_fetch_object(chado_query("EXECUTE currval_$table"));

+ 1 - 1
tripal_feature/includes/fasta_loader.inc

@@ -678,7 +678,7 @@ function tripal_feature_fasta_loader_handle_feature($name, $uname, $db_id, $acce
   
   // if we don't have a feature and the uesr wants to do an update then fail
   if (!$feature and (strcmp($method, 'Update only')==0 or drupal_strcmp($method, 'Insert and update')==0)) {
-    watchdog('T_fasta_loader', "Failed to find feature '%name' ('%name') while matching on " . 
+    watchdog('T_fasta_loader', "Failed to find feature '%name' ('%uiname') while matching on " . 
       drupal_strtolower($match_type), array('%name' => $name, '%uiname' => $uname), WATCHDOG_ERROR);
     return 0;
   }