Przeglądaj źródła

Issue #72: Updating API to include 2.1 improvements: 896d8a8

Stephen Ficklin 7 lat temu
rodzic
commit
cb4c8464fa

+ 1 - 1
legacy/tripal_analysis/includes/tripal_analysis.chado_node.inc

@@ -171,7 +171,7 @@ function chado_analysis_form($node, &$form_state) {
   );
   $form['programversion']= array(
     '#type' => 'textfield',
-    '#title' => t('Program, Pipeline  or Method version'),
+    '#title' => t('Program, Pipeline  or Method Version'),
     '#required' => TRUE,
     '#default_value' => $programversion,
     '#description' => t("Version description, e.g. TBLASTX 2.0MP-WashU [09-Nov-2000]. Enter 'n/a' if no version is available or applicable."),

+ 8 - 6
tripal_chado/includes/loaders/tripal_chado.pub_importer_AGL.inc

@@ -2,10 +2,10 @@
 /**
  * @file
  * This file provides support for importing and parsing of results from the
- * USDA National Agricultural Library (AGL) database.  The functions here are used by
- * both the publication importer setup form and the publication importer.
- *
- * The USDA AGL database uses a YAZ protocol for querying and retrieving records.
+ * USDA National Agricultural Library (AGL) database.  The functions here are
+ * used by both the publication importer setup form and the publication
+ * importer. The USDA AGL database uses a YAZ protocol for querying and
+ * retrieving records.
  *
  */
 
@@ -353,8 +353,10 @@ function tripal_pub_remote_search_AGL($search_array, $num_to_retrieve, $page) {
   // yaz_connect() prepares for a connection to a Z39.50 server. This function is non-blocking
   // and does not attempt to establish a connection - it merely prepares a connect to be
   // performed later when yaz_wait() is called.
-  //$yazc = yaz_connect('agricola.nal.usda.gov:7090/voyager'); // NAL Catalog
-  $yazc = yaz_connect('agricola.nal.usda.gov:7190/voyager');  // NAL Article Citation Database
+  // NAL Catalog
+  //$yazc = yaz_connect('agricola.nal.usda.gov:7090/voyager');
+  // NAL Article Citation Database
+  $yazc = yaz_connect('agricola.nal.usda.gov:7190/voyager');
 
   // use the USMARC record type.  But OPAC is also supported by Agricola
   yaz_syntax($yazc, "usmarc");

+ 2 - 2
tripal_chado/includes/loaders/tripal_chado.pub_importers.inc

@@ -169,9 +169,9 @@ function tripal_pub_importer_setup_page($action = 'new', $pub_import_id = NULL)
       $i = $page * $limit + 1;
       if (count($pubs) > 0) {
         foreach ($pubs as $pub) {
-          $citation = htmlspecialchars($pub['Citation']);
+          $citation = array_key_exists('Citation', $pub) ? htmlspecialchars($pub['Citation']) : 'Unable to generate citation';
           $raw_link = '';
-          if($pub['Publication Dbxref']) {
+          if(array_key_exists('Publication Dbxref', $pub) and $pub['Publication Dbxref']) {
             $raw_link = l('raw', 'admin/tripal/loaders/pub/raw/' . $pub['Publication Dbxref'], array('attributes' => array('target' => '_blank')));
           }
           $rows[] = array(