فهرست منبع

string field handler now deals with aggregated fields not using the aggregate join handler

Lacey Sanderson 13 سال پیش
والد
کامیت
8d33b00e4b
1فایلهای تغییر یافته به همراه8 افزوده شده و 0 حذف شده
  1. 8 0
      base/tripal_core/views/handlers/chado_views_handler_field.inc

+ 8 - 0
base/tripal_core/views/handlers/chado_views_handler_field.inc

@@ -60,6 +60,14 @@ class chado_views_handler_field extends views_handler_field {
    */
   function pre_render (&$values) {
     
+    // further check the results to see if this field is a postgresql array
+    if (!$this->aggregated) {
+      if (preg_match('/^{.*}$/',$values[0]->{$this->field_alias})) {
+        $this->aggregated = TRUE;
+      }
+    }
+    
+    // Split Aggregated Results
     if ($this->aggregated) {
       foreach($values as $k => $v) {
         $values[$k]->{$this->field_alias} = $this->split_array_agg_results($v->{$this->field_alias});