|
@@ -1,7 +1,5 @@
|
|
|
<?php
|
|
|
|
|
|
-// include('views/handlers/views_handler_join_chado_through_linking.inc');
|
|
|
-// include('views/handlers/views_handler_join_chado_aggregator.inc');
|
|
|
include('api/tripal_views.api.inc');
|
|
|
|
|
|
|
|
@@ -67,6 +65,9 @@ function tripal_views_views_handlers() {
|
|
|
'handlers' => array(
|
|
|
|
|
|
// Custom Tripal Filter Handlers
|
|
|
+ 'tripal_views_handler_filter_no_results' => array(
|
|
|
+ 'parent' => 'views_handler_filter'
|
|
|
+ ),
|
|
|
/** D7 @todo: get handlers working
|
|
|
'tripal_views_handler_filter_file_upload' => array(
|
|
|
'parent' => 'views_handler_filter',
|
|
@@ -74,9 +75,6 @@ function tripal_views_views_handlers() {
|
|
|
'tripal_views_handler_filter_textarea' => array(
|
|
|
'parent' => 'views_handler_filter',
|
|
|
),
|
|
|
- 'tripal_views_handler_filter_no_results' => array(
|
|
|
- 'parent' => 'views_handler_filter'
|
|
|
- ),
|
|
|
'tripal_views_handler_filter_select_cvterm' => array(
|
|
|
'parent' => 'views_handler_filter_string',
|
|
|
),
|
|
@@ -199,6 +197,7 @@ function tripal_views_views_handlers() {
|
|
|
* @todo add if !<chado/drupal same db> around NID portion
|
|
|
*
|
|
|
* @ingroup tripal_views
|
|
|
+ */
|
|
|
function tripal_views_views_pre_render(&$view) {
|
|
|
|
|
|
// We need to unset the exposed_input for the view so we can repopulate that
|
|
@@ -211,10 +210,9 @@ function tripal_views_views_pre_render(&$view) {
|
|
|
// results in other formats (e.g. Excel, FASTA, CSV, etc.). The Views Data
|
|
|
// Export module provides small images at the bottom, but we want to provide
|
|
|
// a more intutitive interface for getting different file formats
|
|
|
- $form = drupal_get_form('tripal_views_data_export_download_form', $view, $display_id, $args);
|
|
|
- $view->attachment_after = $form;
|
|
|
+ // $form = drupal_get_form('tripal_views_data_export_download_form', $view, $display_id, $args);
|
|
|
+ // $view->attachment_after = $form;
|
|
|
}
|
|
|
-*/
|
|
|
|
|
|
/**
|
|
|
* Generates a dynamic data array for Views
|
|
@@ -231,10 +229,10 @@ function tripal_views_views_pre_render(&$view) {
|
|
|
function tripal_views_views_data() {
|
|
|
$data = array();
|
|
|
|
|
|
- // Make sure all chado tables are integrated
|
|
|
+ // MAKE SURE ALL CHADO TABLES ARE INTEGRATED
|
|
|
tripal_views_integrate_all_chado_tables();
|
|
|
|
|
|
- // Define Global Fields
|
|
|
+ // DEFINE GLOBAL FIELDS
|
|
|
// Filter handler that lets the admin say:
|
|
|
// "Show no results until they enter search parameters"
|
|
|
$data['views']['search_results'] = array(
|
|
@@ -247,7 +245,7 @@ function tripal_views_views_data() {
|
|
|
|
|
|
$tvi_query = db_query('SELECT * FROM {tripal_views}');
|
|
|
|
|
|
- // D7 TODO: Check DBTNG changes work
|
|
|
+ // INTEGRATE THE LIGHTEST SETUP FOR EACH TABLE
|
|
|
foreach ($tvi_query as $tvi_row) {
|
|
|
|
|
|
// check to see if this is the lightest (drupal-style) priority setup for this table
|
|
@@ -268,8 +266,9 @@ function tripal_views_views_data() {
|
|
|
// indicated whether the current table is a base table or not
|
|
|
$is_base_table = $tvi_row->base_table;
|
|
|
|
|
|
- // populate the base table name and fields. If an $mview_id is given
|
|
|
- // then get the materialized view info, otherwise get the Chado table info
|
|
|
+ // POPULATE THE BASE TABLE NAME AND FIELDS
|
|
|
+ // If an $mview_id is given then get the materialized view info,
|
|
|
+ // otherwise get the Chado table info
|
|
|
if ($mview_id) {
|
|
|
|
|
|
// get the base table name from the materialized view
|
|
@@ -306,55 +305,6 @@ function tripal_views_views_data() {
|
|
|
else {
|
|
|
$base_table = $tvi_row->table_name;
|
|
|
|
|
|
- // Check if we are trying to integrate the node table
|
|
|
- // if we are we want to add to a current integration
|
|
|
- // as compared to create a whole new one
|
|
|
- if ($base_table == 'node') {
|
|
|
-
|
|
|
- /* -- SPF Jun 13, 2013 -- not sure why the node table
|
|
|
- * is included in the Chado integrated tables. I've commented
|
|
|
- * out. I think it was here for integration of chado tables wiht
|
|
|
- * nodes, but code to do this has been added below and it's not
|
|
|
- * necessary to have the node table in the list of integrated tables
|
|
|
- *
|
|
|
- // Add any joins between the node table and other tables
|
|
|
- // D7 TODO: Check DBTNG changes work
|
|
|
- $sql = "SELECT * FROM {tripal_views_join} WHERE setup_id = %d";
|
|
|
- $joins = db_query($sql, $setup_id);
|
|
|
- foreach ($joins as $join) {
|
|
|
- $left_table = $join->left_table;
|
|
|
- $left_field = $join->left_field;
|
|
|
- $base_field = $join->base_field;
|
|
|
- $handler = $join->handler;
|
|
|
-
|
|
|
- // add join entry
|
|
|
- $data[$base_table]['table']['join'][$left_table] = array(
|
|
|
- 'left_field' => $left_field,
|
|
|
- 'field' => $base_field,
|
|
|
- );
|
|
|
- if ($handler) {
|
|
|
- $data[$base_table]['table']['join'][$left_table]['handler'] = $handler;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- // Add in any handlers for node fields
|
|
|
- // D7 TODO: Check DBTNG changes work
|
|
|
- $sql = "SELECT * FROM {tripal_views_handlers} WHERE setup_id=%d";
|
|
|
- $query = db_query($sql, $setup_id);
|
|
|
- foreach ($query as $handler) {
|
|
|
- $data[$base_table][$handler->column_name][$handler->handler_type]['handler'] = $handler->handler_name;
|
|
|
-
|
|
|
- // Add in any additional arguments
|
|
|
- // This should be a serialized array including (at a minimum) name => <handler name>
|
|
|
- if ($handler->arguments) {
|
|
|
- $data[$base_table][$handler->column_name][$handler->handler_type] = array_merge($data[$base_table][$handler->column_name][$handler->handler_type], unserialize($handler->arguments));
|
|
|
- }
|
|
|
- }
|
|
|
- */
|
|
|
- continue;
|
|
|
- }
|
|
|
-
|
|
|
// get the table description
|
|
|
$table_desc = tripal_core_get_chado_table_schema($base_table);
|
|
|
|
|
@@ -378,7 +328,7 @@ function tripal_views_views_data() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // Setup the base table info in the data array
|
|
|
+ // SETUP THE BASE TABLE INFO IN THE DATA ARRAY
|
|
|
$data[$base_table]['table']['group'] = t("$tvi_row->name");
|
|
|
|
|
|
if ($is_base_table) {
|
|
@@ -398,7 +348,7 @@ function tripal_views_views_data() {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- // first add the fields
|
|
|
+ // ADD THE FIELDS TO THE DATA ARRAY
|
|
|
foreach ($base_fields as $column_name => $base_field) {
|
|
|
$data[$base_table][$column_name] = array(
|
|
|
'title' => t($base_field['name']),
|
|
@@ -410,7 +360,6 @@ function tripal_views_views_data() {
|
|
|
|
|
|
|
|
|
// now add the handlers
|
|
|
- // D7 TODO: Check DBTNG changes work
|
|
|
$sql = "SELECT * FROM {tripal_views_handlers} WHERE setup_id = :setup AND column_name = :column";
|
|
|
$handlers = db_query($sql, array(':setup' => $setup_id, ':column' => $column_name));
|
|
|
foreach ($handlers as $handler) {
|
|
@@ -422,125 +371,15 @@ function tripal_views_views_data() {
|
|
|
$data[$base_table][$column_name][$handler->handler_type] = array_merge($data[$base_table][$column_name][$handler->handler_type], unserialize($handler->arguments));
|
|
|
}
|
|
|
};
|
|
|
-
|
|
|
- // add in joins to the node tables if the Chado schema is local
|
|
|
- if (tripal_core_chado_schema_exists()) {
|
|
|
-
|
|
|
- $linker_table = 'chado_' . $base_table;
|
|
|
- $linker_name = ucwords(str_replace('_', ' ', $base_table));
|
|
|
- $schema = tripal_core_get_chado_table_schema($base_table);
|
|
|
- $pkey = $schema['primary key'][0];
|
|
|
-
|
|
|
- // if a node linking table exists then add in the joins
|
|
|
- if (db_table_exists($linker_table)) {
|
|
|
-
|
|
|
- // add the linker table to the data array
|
|
|
- $data[$linker_table] = array(
|
|
|
- // describe the table
|
|
|
- 'table' => array(
|
|
|
- 'title' => 'Chado ' . $linker_name,
|
|
|
- 'group' => 'Chado ' . $linker_name,
|
|
|
- // join to the base table and the node table
|
|
|
- 'join' => array(
|
|
|
- $base_table => array(
|
|
|
- 'left_field' => $pkey,
|
|
|
- 'field' => $pkey,
|
|
|
- ),
|
|
|
- 'node' => array(
|
|
|
- 'left_field' => 'nid',
|
|
|
- 'field' => 'nid',
|
|
|
- ),
|
|
|
- ),
|
|
|
- ),
|
|
|
- // add the nid field
|
|
|
- 'nid' => array(
|
|
|
- 'title' => t($linker_name . ' Node ID'),
|
|
|
- 'help' => t("The node ID for this $linker_name"),
|
|
|
- 'field' => array(
|
|
|
- 'handler' => 'views_handler_field_numeric',
|
|
|
- 'click sortable' => TRUE,
|
|
|
- ),
|
|
|
- 'filter' => array(
|
|
|
- 'handler' => 'views_handler_filter_numeric',
|
|
|
- ),
|
|
|
- 'sort' => array(
|
|
|
- 'handler' => 'views_handler_sort',
|
|
|
- ),
|
|
|
- ),
|
|
|
- // add the primary key field
|
|
|
- $pkey => array(
|
|
|
- 'title' => t($linker_name . ' ' . $pkey),
|
|
|
- 'help' => t("The $base_table primary key"),
|
|
|
- 'field' => array(
|
|
|
- 'handler' => 'views_handler_field_numeric',
|
|
|
- 'click sortable' => TRUE,
|
|
|
- ),
|
|
|
- 'filter' => array(
|
|
|
- 'handler' => 'views_handler_filter_numeric',
|
|
|
- ),
|
|
|
- 'sort' => array(
|
|
|
- 'handler' => 'views_handler_sort',
|
|
|
- ),
|
|
|
- ),
|
|
|
- );
|
|
|
-
|
|
|
- // add the join instructions for the base table
|
|
|
- // (we'll add the recipricol joins for the node table in the hook_views_data_alter
|
|
|
- /**
|
|
|
- $data[$base_table]['table']['join'][$linker_table] = array(
|
|
|
- 'left_field' => 'organism_id',
|
|
|
- 'field' => 'organism_id',
|
|
|
- );
|
|
|
- $data[$base_table]['table']['join']['node'] = array(
|
|
|
- 'left_table' => $linker_table,
|
|
|
- 'left_field' => 'organism_id',
|
|
|
- 'field' => 'organism_id',
|
|
|
- );
|
|
|
- */
|
|
|
-
|
|
|
-
|
|
|
- // Add relationship between linker and base table
|
|
|
- $data[$linker_table][$base_table . '_nid'] = array(
|
|
|
- 'group' => $linker_name,
|
|
|
- 'title' => $linker_name . 'Node',
|
|
|
- 'help' => "Links Chado $linker_name Fields/Data to the Nodes in the current View.",
|
|
|
- 'real field' => $pkey,
|
|
|
- 'relationship' => array(
|
|
|
- 'handler' => 'views_handler_relationship',
|
|
|
- 'title' => t("Chado => $linker_name"),
|
|
|
- 'label' => t("Chado => $linker_name"),
|
|
|
- 'real field' => $pkey,
|
|
|
- 'base' => $base_table,
|
|
|
- 'base field' => $pkey
|
|
|
- ),
|
|
|
- );
|
|
|
-
|
|
|
- // Add node relationship to base table
|
|
|
- $data[$linker_table][$linker_table .'_nid'] = array(
|
|
|
- 'group' => $linker_name,
|
|
|
- 'title' => $linker_name . 'Node',
|
|
|
- 'help' => "Links Chado $linker_name Fields/Data to the Nodes in the current View.",
|
|
|
- 'real field' => 'nid',
|
|
|
- 'relationship' => array(
|
|
|
- 'handler' => 'views_handler_relationship',
|
|
|
- 'title' => t('Chado => Node'),
|
|
|
- 'label' => t('Chado => Node'),
|
|
|
- 'real field' => 'nid',
|
|
|
- 'base' => 'node',
|
|
|
- 'base field' => 'nid'
|
|
|
- ),
|
|
|
- );
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
+ // ADD JOINS & RELATIONSHIPS TO DATA ARRAY
|
|
|
// only add joins if this is a base table
|
|
|
// this keeps the list of available fields manageable
|
|
|
// all other tables should be added via relationships
|
|
|
- // D7 todo: add tripal_views_join field that determines whether a join is added
|
|
|
+ // D7 @todo: add tripal_views_join field that determines whether a join is added
|
|
|
if ($is_base_table) {
|
|
|
- // now add the joins
|
|
|
- // D7 TODO: Check DBTNG changes work
|
|
|
+
|
|
|
$sql = "SELECT * FROM {tripal_views_join} WHERE setup_id = :setup";
|
|
|
$joins = db_query($sql, array(':setup' => $setup_id));
|
|
|
if (!isset($joins)) {
|
|
@@ -549,8 +388,11 @@ function tripal_views_views_data() {
|
|
|
foreach ($joins as $join) {
|
|
|
$left_table = $join->left_table;
|
|
|
$left_field = $join->left_field;
|
|
|
+ $base_table = $join->base_table;
|
|
|
$base_field = $join->base_field;
|
|
|
$handler = $join->handler;
|
|
|
+ $base_title = ucwords(str_replace('_', ' ', $base_table));
|
|
|
+ $left_title = ucwords(str_replace('_', ' ', $left_table));
|
|
|
|
|
|
// if the 'node' table is in our integrated list then
|
|
|
// we want to skip it. It shouldn't be there.
|
|
@@ -559,81 +401,143 @@ function tripal_views_views_data() {
|
|
|
}
|
|
|
|
|
|
// add join entry
|
|
|
- $data[$left_table]['table']['join'][$base_table] = array(
|
|
|
- 'left_field' => $base_field,
|
|
|
- 'field' => $left_table . '_id',
|
|
|
+ if (!$join->relationship_only) {
|
|
|
+ $data[$left_table]['table']['join'][$base_table] = array(
|
|
|
+ 'left_field' => $base_field,
|
|
|
+ 'field' => $left_table . '_id',
|
|
|
+ );
|
|
|
+ if ($handler) {
|
|
|
+ $data[$left_table]['table']['join'][$base_table]['handler'] = $handler;
|
|
|
+ }
|
|
|
+ if (!empty($join->arguments)) {
|
|
|
+ array_merge($data[$left_table]['table']['join'][$base_table], unserialize($join->arguments));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // warn if deprecated method of relationship addition was used (ie: through handlers)
|
|
|
+ if (isset($data[$base_table][$base_field]['relationship'])) {
|
|
|
+ watchdog('tripal_views',
|
|
|
+ 'DEPRECATED: Currently using tripal_views_handlers to store relationship for %base => %left when you should be using tripal_views_joins.',
|
|
|
+ array('%base' => $base_table, '%left' => $left_table),
|
|
|
+ WATCHDOG_NOTICE);
|
|
|
+ }
|
|
|
+ // add relationship entry
|
|
|
+ $fake_field = $base_table . '_to_' . $left_table;
|
|
|
+ $data[$base_table][$fake_field] = array(
|
|
|
+ 'title' => "$base_title => $left_title",
|
|
|
+ 'help' => "Joins $base_title to $left_title",
|
|
|
+ 'relationship' => array(
|
|
|
+ 'handler' => $join->relationship_handler,
|
|
|
+ 'title' => t("$base_title => $left_title"),
|
|
|
+ 'label' => t("$base_title => $left_title"),
|
|
|
+ 'real field' => $base_field,
|
|
|
+ 'base' => $left_table,
|
|
|
+ 'base field' => $left_field
|
|
|
+ )
|
|
|
);
|
|
|
- if ($handler) {
|
|
|
- $data[$left_table]['table']['join'][$base_table]['handler'] = $handler;
|
|
|
+ if (!empty($join->arguments)) {
|
|
|
+ array_merge($data[$base_table][$fake_field]['relationship'], unserialize($join->arguments));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ ddl('cleared view cache');
|
|
|
+
|
|
|
return $data;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * Implements hook_views_data_alter().
|
|
|
+ * Used to add Chado <-> Node Joins & Relationships
|
|
|
+ * since you need to add to the $data['node'] to do this
|
|
|
*
|
|
|
* @ingroup tripal_views
|
|
|
-
|
|
|
+ */
|
|
|
function tripal_views_views_data_alter(&$data) {
|
|
|
- // D7 TODO: Check DBTNG changes work
|
|
|
- $tvi_query = db_query('SELECT * FROM {tripal_views}');
|
|
|
|
|
|
- // iterate through the views that we manage
|
|
|
+ // ADD IN NODE JOINS & RELATIONSHIPS
|
|
|
+ // D7 @todo: Create custom handler to allow join from Node => Base (ie: organism)
|
|
|
+ // with the addition of a single relationship
|
|
|
+ // D7 @todo: Create custom handler to allow join from Base (ie: organism)
|
|
|
+ // with the addition of a single relationship
|
|
|
+ // D7 @todo: Add support for Mview <-> Node joins and relationships
|
|
|
+ $tvi_query = db_query('SELECT * FROM {tripal_views} WHERE base_table=1');
|
|
|
foreach ($tvi_query as $tvi_row) {
|
|
|
|
|
|
//ids we'll use for queries
|
|
|
- $mview_id = $tvi_row->mview_id;
|
|
|
$setup_id = $tvi_row->setup_id;
|
|
|
-
|
|
|
-
|
|
|
- // iterate through the columns and alter the existing data array for
|
|
|
- // joins to other tables
|
|
|
- // D7 TODO: Check DBTNG changes work
|
|
|
- $sql = "SELECT * FROM {tripal_views_join} WHERE setup_id = :setup";
|
|
|
- $joins = db_query($sql, array(':setup' => $setup_id));
|
|
|
- foreach ($joins as $join) {
|
|
|
- $left_table = $join->left_table;
|
|
|
- $left_field = $join->left_field;
|
|
|
- $base_field = $join->base_field;
|
|
|
- $base_table = $join->base_table;
|
|
|
-
|
|
|
- // add the recipricol join entries for each column
|
|
|
- if (array_key_exists($left_table, $data) and $base_table != 'node') {
|
|
|
- $data[$left_table]['table']['join'][$base_table] = array(
|
|
|
- 'left_field' => $base_field,
|
|
|
- 'field' => $left_field,
|
|
|
- );
|
|
|
- }
|
|
|
- }
|
|
|
+ $base_table = $tvi_row->table_name;
|
|
|
+ $linker_table = 'chado_' . $base_table;
|
|
|
+ $base_title = ucwords(str_replace('_', ' ', $base_table));
|
|
|
|
|
|
// add in joins to the node tables if the Chado schema is local
|
|
|
if (tripal_core_chado_schema_exists()) {
|
|
|
- $base_table = $tvi_row->table_name;
|
|
|
- $linker_table = 'chado_' . $base_table;
|
|
|
// if a node linking table exists then add in the joins
|
|
|
if (db_table_exists($linker_table)) {
|
|
|
|
|
|
+ // Adds content (node) fields to chado base table field lists automatically
|
|
|
$data['node']['table']['join'][$linker_table] = array(
|
|
|
'left_field' => 'nid',
|
|
|
'field' => 'nid',
|
|
|
);
|
|
|
+ $data[$linker_table]['table']['join'][$base_table] = array(
|
|
|
+ 'left_field' => $base_table . '_id',
|
|
|
+ 'field' => $base_table . '_id',
|
|
|
+ );
|
|
|
$data['node']['table']['join'][$base_table] = array(
|
|
|
'left_table' => $linker_table,
|
|
|
'left_field' => 'nid',
|
|
|
'field' => 'nid',
|
|
|
);
|
|
|
+
|
|
|
+ // Adds in a chado base table => node relationship
|
|
|
+ // This allows controlled joining to multiple nodes per line
|
|
|
+ // Use Case: link to feature and organism nodes on a feature listing
|
|
|
+ // D7 todo: a custom relationship handler to get from feature.organism_id => organism node
|
|
|
+ // without 1st needing to add relationship to organism table
|
|
|
+ $base_field = $base_table . '_id';
|
|
|
+ $data[$linker_table][$base_field] = array(
|
|
|
+ 'group' => $base_title,
|
|
|
+ 'title' => $base_title . 'Node',
|
|
|
+ 'help' => "Links $base_title to it's node.",
|
|
|
+ 'relationship' => array(
|
|
|
+ 'handler' => 'views_handler_relationship',
|
|
|
+ 'title' => t("$base_title => Node"),
|
|
|
+ 'label' => t("$base_title => Node"),
|
|
|
+ 'real field' => 'nid',
|
|
|
+ 'base' => 'node',
|
|
|
+ 'base field' => 'nid'
|
|
|
+ ),
|
|
|
+ );
|
|
|
+
|
|
|
+ // Add Chado fields to a node-based view
|
|
|
+ // This will only be done with relationships
|
|
|
+ $base_field = $base_table . '_id';
|
|
|
+ $data['node'][$base_field] = array(
|
|
|
+ 'group' => $base_title,
|
|
|
+ 'title' => $base_title,
|
|
|
+ 'help' => "Links node to chado $base_title.",
|
|
|
+ 'relationship' => array(
|
|
|
+ 'handler' => 'views_handler_relationship',
|
|
|
+ 'title' => t("Node => $base_title"),
|
|
|
+ 'label' => t("Node => $base_title"),
|
|
|
+ 'real field' => 'nid',
|
|
|
+ 'base' => $linker_table,
|
|
|
+ 'base field' => 'nid'
|
|
|
+ ),
|
|
|
+ );
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
return $data;
|
|
|
}
|
|
|
-*/
|
|
|
|
|
|
/**
|
|
|
* Implementation of hook_views_plugins().
|
|
|
+ */
|
|
|
function tripal_views_views_plugins() {
|
|
|
$tc_path = drupal_get_path('module', 'tripal_views');
|
|
|
|
|
@@ -699,32 +603,6 @@ function tripal_views_views_pre_view(&$view, &$display_id, &$args) {
|
|
|
$view->attachment_after = $form;
|
|
|
}*/
|
|
|
|
|
|
-/**
|
|
|
- * Implementation of hook_views_pre_execute().
|
|
|
-function tripal_views_views_pre_execute(&$view) {
|
|
|
- // if the base table is a chado table then we want to set the
|
|
|
- // search path so it can find all of the tables.
|
|
|
- // this will break views that use tables that have the same name
|
|
|
- // as chado tables (e.g. contact).
|
|
|
- $desc = tripal_core_get_chado_table_schema($view->base_table);
|
|
|
- if ($desc) {
|
|
|
- tripal_db_set_chado_search_path('chado');
|
|
|
- }
|
|
|
-}
|
|
|
-*/
|
|
|
-
|
|
|
-/**
|
|
|
- * Implementation of hook_views_post_render().
|
|
|
-function tripal_views_views_post_render(&$view, &$output, &$cache) {
|
|
|
- // if the base table and the query is completed we want to set
|
|
|
- // the search path back to the default.
|
|
|
- $desc = tripal_core_get_chado_table_schema($view->base_table);
|
|
|
- if ($desc) {
|
|
|
- tripal_db_set_default_search_path();
|
|
|
- }
|
|
|
-}
|
|
|
-*/
|
|
|
-
|
|
|
/**
|
|
|
* the Download Views data export form
|
|
|
function tripal_views_data_export_download_form(&$form_state, $view, $display_id, $args) {
|