浏览代码

Forgot to remove dpm

Stephen Ficklin 7 年之前
父节点
当前提交
0860827c2a

+ 11 - 10
tripal_chado/includes/TripalFields/local__source_data/local__source_data_formatter.inc

@@ -15,16 +15,17 @@ class local__source_data_formatter extends ChadoFieldFormatter {
 
     $content = 'The data source is not provided.';
     if ($items[0]['value']) {
-      $content = "
-        <dl class=\"tripal-dl\">
-           <dt>Source Name</dt>
-           <dd>: " . $items[0]['value']['schema:name'] . " </dd>
-           <dt>Source Version</dt>
-           <dd>: " . $items[0]['value']['IAO:0000129'] . " </dd>
-           <dt>Source URI</dt>
-           <dd>: " . l($items[0]['value']['data:1047'], $items[0]['value']['data:1047'], array('attributes' => array('target' => '_blank'))) . " </dd>
-        </dl>
-      ";
+      $content = "<dl class=\"tripal-dl\">";
+      if (!empty($items[0]['value']['schema:name'])) {
+        $content .= "<dt>Source Name</dt><dd>: " . $items[0]['value']['schema:name'] . " </dd>";
+      }
+      if (!empty($items[0]['value']['IAO:0000129'])) {
+        $content .= "<dt>Source Version</dt><dd>: " . $items[0]['value']['IAO:0000129'] . " </dd>";
+      }
+      if (!empty($items[0]['value']['data:1047'])) {
+        $content .= "<dt>Source URI</dt><dd>: " . l($items[0]['value']['data:1047'], $items[0]['value']['data:1047'], array('attributes' => array('target' => '_blank'))) . " </dd>";
+      }
+      $content .= "</dl>";
     }
     $element[0] = array(
       // We create a render array to produce the desired markup,

+ 0 - 1
tripal_chado/includes/tripal_chado.field_storage.inc

@@ -163,7 +163,6 @@ function tripal_chado_field_storage_write_table($table_name, $values, $base_tabl
         }
       }
     }
-    dpm($values);
 
     // Insert the values array as a new record in the table but remove the
     // pkey as it should be set.