소스 검색

Working towards making legacy modules work

Stephen Ficklin 9 년 전
부모
커밋
e40101b4cf

+ 0 - 67
legacy/tripal_core/theme/templates/tripal_core_customize.tpl.php

@@ -1,67 +0,0 @@
-<p>Tripal was designed to allow for maiximum customization of content and the look-and-feel of the site.  By default,
-Tripal provides a suite of Drupal style templates that provide a generic presentation of data from a Chado database. 
-There are many options for customizing the look and feel of Tripal. Some customizations can be done without any
-programming whatsoever.  However, for advanced customizations, Tripal provides a robust API to allow a programmer
-to easily interact (select, update, delete, insert) data from a Chado database in whatever custom way desired.</p>
-
-<li><p><b>Integration with Drupal Views</b>: <a href="http://drupal.org/project/views">Drupal Views</a> is
-a powerful tool that allows the site administrator to create lists or basic searching forms of Chado content.
-It provides a graphical interface within Drupal to allow the site admin to directly query the Chado database
-and create custom lists without PHP programming or customization of Tripal source code.  Views can also
-be created to filter content that has not yet been synced with Druapl in order to protect access to non
-published data (only works if Chado was installed using Tripal).  If you have Views installed and enabled
-You can see a list of available pre-existing
-Views <a href="' . url('admin/build/views/') ?>">here</a>, as well as create your own. All Chado tables have 
-been exposed to Drupal Views</p></li>
-
-<h3>Customizations Without Programming</h3>
-<p>There are several ways to customize the look-and-feel for the way Chado data is presented through Tripal.
-Below is a description of several methods.  These methods may be used in conjunction with one another to
-provide fine-grained control.</p>
-<ul>
-
-<li><p><b>Integration with Drupal Panels</b>:  <a href="http://drupal.org/project/views">Drupal Panels</a>
-allows for customization of a page layout. Tripal comes with pre-set layouts for project pages.  However,
-Panels become useful if you prefer a layout that is different from the pre-set layouts.  Chado content
-is provided to Panels in the form of Drupal "blocks" which you can then place anywhere on a page using the
-Panel\'s GUI.</p></li>
-
-<li><p><b>Drupal\'s Content Construction Kit (CCK)</b>: the
-<a href="http://drupal.org/project/cck">Content Construction Kit (CCK) </a> is a powerful way to add non-Chado content
-to any page without need to edit template files or knowing PHP.  You must first download and install CCK.
-With CCK, the site administartor can create a new fields to appear on any Tripal node page.  
-A field added by CCK will appear in the form when editing to allow users to manually enter the appropriate
-text.  These field values are not stored in Chado, but will appear on the page when saved. 
-If you are using the default themeing provided by Tripal, then it is better to create the CCK element,
-indicate that it is not to be shown (using the CCK interface), then manually add the new fields
-where desired by editing the templates (see section below about customizing through programming).  
-If using Panels, the CCK field can be added to the location desired using the Panels interface.</p></li>
-
-<li><p><b>Adding Links to the "Resources" Sidebar</b>: You can add new items to the resources side-bar of any Tripal node using the 
-<a href="http://drupal.org/project/cck">Content Construction Kit (CCK) </a>module and adding new field types to Tripal node types.  Instructions for adding these fields can be found
-on the <?php l('Tripal v1.0 Tutorial', 'http://www.gmod.org/wiki/Tripal_Tutorial_(v1.0)#Adding_Additional_Resources')?>  </p>
-</li>
-
-</ul>
-
-<h3>Customizations Through Programming</h3>
-<ul>
-<li><p><b>Adding Links to the "Resources" Sidebar</b>: If you use the pre-set default Tripal layout for theming, you
-will see a "Resources" sidebar on each page.  The links that appear on the sidebar are automatically generated
-using Javascript for all of the project "Blocks" that appear on the page. If you want to add additional links
-(e.g. a link to a views table showing all features of the current project) and you want that link to appear in the
-"Resources" sidebar, simply edit the Drupal Node Template (as described above) and add the link to the
-section at the bottom of the template file where the resources section is found.</p></li>
-
-<li><p><b>Editing Templates and Creating Custom Extension Modules</b>:There are several ways to customize the look-and-feel
-  for the way Chado data is presented through Tripal.
-  See the <a href="http://www.gmod.org/wiki/Tripal_Developer's_Handbook">Developers Handbook</a> for further infromation.   
-</p></li>
-
-<li><p><b>Sharing your customizations</b>: If you create a custom extension module that uses the Tripal API in
-accordance with the instructions in the Developers Handbook you can share your modules with other Tripal users.
-To share you module, you must first create a project account with Drupal and upload your extension module there. 
-Next, subscribe to the <a href="https://lists.sourceforge.net/lists/listinfo/gmod-tripal-devel">Tripal Developer's Mailing List
-</a> and send an email to the group indicating you have a new extension module and would like to share it.  A list of 
-extension modules that properly follow the Tripal API will be listed on the Tripal website for others to easily find.</p></li>
-</ul>

+ 0 - 3
legacy/tripal_core/theme/templates/tripal_core_customtables_help.tpl.php

@@ -1,3 +0,0 @@
-<p>The Tripal Jobs Management System provides a framework for Biological jobs to be run
-via the command-line in order to eliminate the problems associated with long running
-jobs in the web browser (ie: timeout errors).</p>

+ 0 - 325
legacy/tripal_core/tripal_core.install

@@ -67,18 +67,6 @@ function tripal_core_get_schemas() {
   $schema = array();
 
   // get all the various schema parts and join them together
-  $temp = tripal_core_get_jobs_schema();
-  foreach ($temp as $table => $arr) {
-    $schema[$table] = $arr;
-  }
-  $temp = tripal_core_get_mviews_schema();
-  foreach ($temp as $table => $arr) {
-    $schema[$table] = $arr;
-  }
-  $temp = tripal_core_get_custom_tables_schema();
-  foreach ($temp as $table => $arr) {
-    $schema[$table] = $arr;
-  }
   $temp = tripal_core_get_tripal_token_schema();
   foreach ($temp as $table => $arr) {
     $schema[$table] = $arr;
@@ -95,287 +83,6 @@ function tripal_core_get_schemas() {
   return $schema;
 }
 
-/**
- * Describes the Tripal Materialized View (tripal_mviews) table
- * This table keeps track of all materialized views created by Tripal and stored in chado
- *
- * @ingroup tripal_core
- */
-function tripal_core_get_mviews_schema() {
-  $schema = array();
-
-  $schema['tripal_mviews'] = array(
-    'fields' => array(
-      'mview_id' => array(
-        'type' => 'serial',
-        'unsigned' => TRUE,
-        'not NULL' => TRUE
-      ),
-      'name' => array(
-        'type' => 'varchar',
-        'length' => 255,
-        'not NULL' => TRUE
-      ),
-      'modulename' => array(
-        'type' => 'varchar',
-        'length' => 50,
-        'not NULL' => TRUE,
-        'description' => 'The module name that provides the callback for this job'
-      ),
-      'mv_table' => array(
-        'type' => 'varchar',
-        'length' => 128,
-        'not NULL' => FALSE
-      ),
-      'mv_specs' => array(
-        'type' => 'text',
-        'size' => 'normal',
-        'not NULL' => FALSE
-      ),
-      'mv_schema' => array(
-        'type' => 'text',
-        'size' => 'normal',
-        'not NULL' => FALSE
-      ),
-      'indexed' => array(
-        'type' => 'text',
-        'size' => 'normal',
-        'not NULL' => FALSE
-      ),
-      'query' => array(
-        'type' => 'text',
-        'size' => 'normal',
-        'not NULL' => TRUE
-      ),
-      'special_index' => array(
-        'type' => 'text',
-        'size' => 'normal',
-        'not NULL' => FALSE
-      ),
-      'last_update' => array(
-        'type' => 'int',
-        'not NULL' => FALSE,
-        'description' => 'UNIX integer time'
-      ),
-      'status'        => array(
-        'type' => 'text',
-        'size' => 'normal',
-        'not NULL' => FALSE
-      ),
-      'comment' => array(
-        'type' => 'text',
-        'size' => 'normal',
-        'not NULL' => FALSE
-      ),
-    ),
-    'indexes' => array(
-      'mview_id' => array('mview_id')
-    ),
-    'unique keys' => array(
-      'mv_table' => array('mv_table'),
-      'mv_name' => array('name'),
-    ),
-    'primary key' => array('mview_id'),
-  );
-
-  return $schema;
-}
-
-/**
- * Describes the Tripal Jobs (tripal_jobs) table
- * This table keeps track of all tripal jobs including their current status and is used
- * by tripal_launch_jobs to determine which jobs need to be run
- *
- * @ingroup tripal_core
- */
-function tripal_core_get_jobs_schema() {
-  $schema = array();
-  $schema['tripal_jobs'] = array(
-    'fields' => array(
-      'job_id' => array(
-        'type' => 'serial',
-        'unsigned' => TRUE,
-        'not NULL' => TRUE
-      ),
-      'uid' => array(
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'not NULL' => TRUE,
-        'description' => 'The Drupal userid of the submitee'
-      ),
-      'job_name' => array(
-        'type' => 'varchar',
-        'length' => 255,
-        'not NULL' => TRUE
-      ),
-      'modulename' => array(
-        'type' => 'varchar',
-        'length' => 50,
-        'not NULL' => TRUE,
-        'description' => 'The module name that provides the callback for this job'
-      ),
-      'callback' => array(
-        'type' => 'varchar',
-        'length' => 255,
-        'not NULL' => TRUE
-      ),
-      'arguments' => array(
-        'type' => 'text',
-        'size' => 'normal',
-        'not NULL' => FALSE
-      ),
-      'progress' => array(
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'default' => 0,
-        'not NULL' => FALSE,
-        'description' => 'a value from 0 to 100 indicating percent complete'
-      ),
-      'status' => array(
-        'type' => 'varchar',
-        'length' => 50,
-        'not NULL' => TRUE
-      ),
-      'submit_date' => array(
-        'type' => 'int',
-        'not NULL' => TRUE,
-        'description' => 'UNIX integer submit time'
-      ),
-      'start_time' => array(
-        'type' => 'int',
-        'not NULL' => FALSE,
-        'description' => 'UNIX integer start time'
-      ),
-      'end_time' => array(
-        'type' => 'int',
-        'not NULL' => FALSE,
-        'description' => 'UNIX integer end time'
-      ),
-      'error_msg' => array(
-        'type' => 'text',
-        'size' => 'normal',
-        'not NULL' => FALSE
-      ),
-      'pid' => array(
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'not NULL' => FALSE,
-        'description' => 'The process id for the job'
-      ),
-      'priority' => array(
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'not NULL' => TRUE,
-        'default' => '0',
-        'description' => 'The job priority'
-      ),
-      'mlock' => array(
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'not NULL' => FALSE,
-        'description' => 'If set to 1 then all jobs for the module are held until this one finishes'
-      ),
-      'lock' => array(
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'not NULL' => FALSE,
-        'description' => 'If set to 1 then all jobs are held until this one finishes'
-      ),
-    ),
-    'indexes' => array(
-      'job_id' => array('job_id'),
-      'job_name' => array('job_name')
-    ),
-    'primary key' => array('job_id'),
-  );
-
-  return $schema;
-}
-
-/**
- * Describes the Tripal Custom Tables (tripal_custom_tables) table
- * This keeps track of tables created by Tripal and stored in chado that may or may not
- * also be materialized views.
- *
- * @ingroup tripal_core
- */
-function tripal_core_get_custom_tables_schema() {
-  $schema = array();
-  $schema['tripal_custom_tables'] = array(
-    'fields' => array(
-      'table_id' => array(
-        'type' => 'serial',
-        'unsigned' => TRUE,
-        'not NULL' => TRUE
-      ),
-      'table_name' => array(
-        'type' => 'varchar',
-        'length' => 255,
-        'not NULL' => TRUE
-      ),
-      'schema' => array(
-        'type' => 'text',
-        'not NULL' => TRUE
-      ),
-      'mview_id' => array(
-        'type' => 'int',
-        'not NULL' => FALSE
-      )
-    ),
-    'indexes' => array(
-      'table_id' => array('table_id'),
-    ),
-    'primary key' => array('table_id'),
-    'foreign keys' => array(
-      'tripal_mviews' => array(
-        'table' => 'tripal_mviews',
-        'columns' => array(
-          'mview_id' => 'mview_id'
-        ),
-      ),
-    ),
-  );
-
-  return $schema;
-}
-
-function tripal_core_get_tripal_token_schema() {
-  $schema = array();
-  $schema['tripal_token_formats'] = array(
-    'fields' => array(
-      'tripal_format_id' => array(
-        'type' => 'serial',
-        'unsigned' => TRUE,
-        'not null' => TRUE
-      ),
-      'content_type' => array(
-        'type' => 'varchar',
-        'length' => 255,
-        'not null' => TRUE
-      ),
-      'application' => array(
-        'type' => 'varchar',
-        'length' => 255,
-        'not null' => TRUE
-      ),
-      'format' => array(
-        'type' => 'text',
-        'not null' => TRUE
-      ),
-      'tokens' => array(
-        'type' => 'text',
-        'not null' => TRUE
-      ),
-    ),
-    'unique keys' => array(
-      'type_application' => array('content_type', 'application'),
-    ),
-    'primary key' => array('tripal_format_id'),
-  );
-
-  return $schema;
-}
-
 /**
  *
  *
@@ -437,38 +144,6 @@ function tripal_core_get_tripal_toc_schema() {
  */
 function tripal_core_get_tripal_vars_schema() {
   $schema = array();
-  $schema['tripal_variables'] = array(
-    'description' => 'This table houses a list of unique variable names that ' .
-      'can be used in the tripal_node_variables table.',
-    'fields' => array(
-      'variable_id' => array (
-        'type' => 'serial',
-        'not null' => TRUE,
-      ),
-      'name' => array(
-        'type' => 'varchar',
-        'length' => 255,
-        'not null' => TRUE,
-      ),
-      'description' => array(
-        'type' => 'text',
-        'not null' => TRUE,
-      ),
-    ),
-    'primary key' => array (
-        0 => 'variable_id',
-    ),
-    'unique keys' => array (
-      'tripal_variables_c1' => array (
-        0 => 'name',
-      ),
-    ),
-    'indexes' => array (
-      'tripal_variable_names_idx1' => array (
-        0 => 'variable_id',
-      ),
-    ),
-  );
 
   $schema['tripal_node_variables'] = array(
     'description' => 'This table is used for storing any type of variable such as ' .

+ 26 - 429
legacy/tripal_core/tripal_core.module

@@ -22,27 +22,6 @@ require_once 'includes/tripal_core.form_elements.inc';
  * @}
  */
 
-tripal_core_set_globals();
-
-/**
- * This function is used to set the global Chado variables
- *
- * @ingroup tripal_core
- */
-function tripal_core_set_globals() {
-  // these global variables are meant to be accessed by all Tripal
-  // modules to find the chado version installed and if Chado is local.
-  // these variables are stored as globals rather than using the drupal_set_variable
-  // functions because the Drupal functions make databaes queries and for long
-  // running loaders we don't want those queries repeatedly.
-  $GLOBALS["chado_is_installed"]  = chado_is_installed();
-  if ($GLOBALS["chado_is_installed"]) {
-    $GLOBALS["chado_is_local"]      = chado_is_local();
-    $GLOBALS["chado_version"]       = chado_get_version();
-    $GLOBALS["exact_chado_version"] = chado_get_version(TRUE);
-  }
-}
-
 /**
  * Implements hook_init().
  * Used to set the search_path, create default content and set default variables.
@@ -50,46 +29,6 @@ function tripal_core_set_globals() {
  * @ingroup tripal_core
  */
 function tripal_core_init() {
-  global $base_url;
-
-  // create the 'tripal' controlled volcabulary in chado but only if it doesn't already exist, and
-  // only if the chado database is present.
-  if ($GLOBALS["chado_is_installed"]) {
-
-    // if the Tripal cv is missing then add
-    $results = chado_query("SELECT * FROM {cv} WHERE name = 'tripal'");
-    $tripal_cv = $results->fetchObject();
-    if (!$tripal_cv) {
-      $results = chado_query(
-        "INSERT INTO {cv} (name,definition) " .
-        "VALUES ('tripal', 'Terms used by Tripal for modules to manage data such as that stored in property tables like featureprop, analysisprop, etc')"
-      );
-    }
-
-    // if the Tripal db is missing then add it
-    $results = chado_query("SELECT * FROM {db} WHERE name = 'tripal'");
-    $tripal_db = $results->fetchObject();
-    if (!$tripal_db) {
-      $results = chado_query(
-        "INSERT INTO {db} (name,description) " .
-        "VALUES ('tripal', 'Used as a database placeholder for tripal defined objects such as tripal cvterms')"
-      );
-    }
-  }
-
-  // add some variables for all javasript to use for building URLs
-  $theme_dir = drupal_get_path('theme', 'tripal');
-  $clean_urls = variable_get('clean_url', 0);
-  drupal_add_js(
-    " var baseurl  = '$base_url';
-      var themedir = '$theme_dir';
-      var isClean  =  $clean_urls;",
-    'inline', 'header');
-
-  // make sure the date time settings are the way Tripal will insert them
-  // otherwise PostgreSQL version that may have a different datestyle setting
-  // will fail when inserting or updating a date column in a table.
-  db_query("SET DATESTYLE TO :style", array(':style' => 'MDY'));
 
   // If we want AHAH elements on the node forms (e.g. chado_pub form) then we need to include
   // the node.pages file. Otherwise this error message is given:
@@ -110,264 +49,6 @@ function tripal_core_init() {
 function tripal_core_menu() {
   $items = array();
 
-  // Tripal setting groups
-  $items['admin/tripal'] = array(
-    'title' => 'Tripal',
-    'description' => t("Manage the behavior or Tripal and its various modules."),
-    'weight' => -8,
-    'page callback' => 'system_admin_menu_block_page',
-    'access arguments' => array('administer tripal'),
-    'file' => 'system.admin.inc',
-    'file path' => drupal_get_path('module', 'system'),
-  );
-  $items['admin/tripal/tripal_jobs'] = array(
-    'title' => 'Jobs',
-    'description' => t('Jobs managed by Tripal'),
-    'page callback' => 'tripal_jobs_admin_view',
-    'access arguments' => array('administer tripal'),
-    'type' => MENU_NORMAL_ITEM,
-    'weight' => 0
-  );
-  $items['admin/tripal/loaders'] = array(
-    'title' => 'Data Loaders',
-    'description' => t('Tools facilitating loading data. Includes a generic tab-delimited loader (Bulk Loader).'),
-    'access arguments' => array('administer tripal'),
-    'type' => MENU_NORMAL_ITEM,
-    'weight' => 6
-  );
-  $items['admin/tripal/storage'] = array(
-    'title' => 'Storage Backend',
-    'description' => t("Functionality related to data storage and tools to interact with the storage backend."),
-    'weight' => 8,
-    'access arguments' => array('administer tripal'),
-  );
-  $items['admin/tripal/chado'] = array(
-    'title' => 'Legacy Tripal',
-    'description' => t('Tools related to Tripal2 Legacy chado-based node types.'),
-    'access arguments' => array('administer tripal'),
-    'type' => MENU_NORMAL_ITEM,
-    'weight' => 20
-  );
-  $items['admin/tripal/extension'] = array(
-    'title' => 'Extensions',
-    'description' => t('Configuration for Tripal extensions.'),
-    'access arguments' => array('administer tripal'),
-    'type' => MENU_NORMAL_ITEM,
-    'weight' => 100
-  );
-  $items['admin/tripal/extension/import'] = array(
-    'title' => 'Import Extensions',
-    'description' => 'Provides a list of the available extensions that are registered at the tripal.info site. From this page you can easily import or install extensions to your site.',
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('tripal_core_extensions_form'),
-    'access arguments' => array('administer tripal'),
-    'type' => MENU_NORMAL_ITEM,
-    'file' =>  'includes/tripal_core.extensions.inc',
-    'file path' => drupal_get_path('module', 'tripal_core'),
-    'weight' => -100,
-  );
-
-  // Chado Storage Backend
-  $items['admin/tripal/storage/chado'] = array(
-    'title' => 'Chado Schema',
-    'description' => t("Tools to extend the chado schema through custom tables & materialized views."),
-    'weight' => -100,
-    'access arguments' => array('administer tripal'),
-  );
-  $items['admin/tripal/storage/chado/chado_install'] = array(
-    'title' => 'Install Chado Schema',
-    'description' => t('Installs the Chado database tables, views, etc., inside the current Drupal database'),
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('tripal_core_chado_load_form'),
-    'access arguments' => array('install chado'),
-    'type' => MENU_NORMAL_ITEM,
-    'weight' => -100
-  );
-/*
-  $items['admin/tripal/setup/customize'] = array(
-    'title' => 'Customize Tripal',
-    'description' => t('Information on how to customize tripal'),
-    'page callback' => 'theme',
-    'page arguments' => array('tripal_core_customize'),
-    'access arguments' => array('administer tripal'),
-    'weight' => 10
-  );
-*/
-
-  // Jobs Management
-  $items['admin/tripal/tripal_jobs/help'] = array(
-    'title' => 'Help',
-    'description' => t('Help for the tripal job management system'),
-    'page callback' => 'theme',
-    'page arguments' => array('tripal_core_job_help'),
-    'access arguments' => array('administer tripal'),
-    'type' => MENU_LOCAL_TASK,
-    'weight' => 10
-  );
-  $items['admin/tripal/tripal_jobs/cancel/%'] = array(
-    'title' => 'Jobs',
-    'description' => t('Cancel a pending job'),
-    'page callback' => 'tripal_cancel_job',
-    'page arguments' => array(4),
-    'access arguments' => array('administer tripal'),
-    'type' => MENU_CALLBACK,
-  );
-  $items['admin/tripal/tripal_jobs/rerun/%'] = array(
-    'title' => 'Jobs',
-    'description' => t('Re-run an existing job.'),
-    'page callback' => 'tripal_rerun_job',
-    'page arguments' => array(4),
-    'access arguments' => array('administer tripal'),
-    'type' => MENU_CALLBACK,
-  );
-  $items['admin/tripal/tripal_jobs/view/%'] = array(
-    'title' => 'Jobs Details',
-    'description' => t('View job details.'),
-    'page callback' => 'tripal_jobs_view',
-    'page arguments' => array(4),
-    'access arguments' => array('administer tripal'),
-    'type' => MENU_CALLBACK,
-  );
-  $items['admin/tripal/tripal_jobs/views/jobs/enable'] = array(
-    'title' => 'Enable Jobs Administrative View',
-    'page callback' => 'tripal_enable_view',
-    'page arguments' => array('tripal_core_admin_jobs', 'admin/tripal/tripal_jobs'),
-    'access arguments' => array('administer tripal'),
-    'type' => MENU_CALLBACK,
-  );
-
-  // Materialized Views
-  $items['admin/tripal/storage/chado/mviews'] = array(
-    'title' => 'Materialized Views',
-    'description' => t('Materialized views are used to improve speed of large or complex queries.'),
-    'page callback' => 'tripal_mview_admin_view',
-    'access arguments' => array('administer tripal'),
-    'type' => MENU_NORMAL_ITEM,
-    'weight' => -10
-  );
-  $items['admin/tripal/storage/chado/mviews/help'] = array(
-    'title' => 'Help',
-    'description' => t('Help for the materialized views management system'),
-    'page callback' => 'theme',
-    'page arguments' => array('tripal_core_mviews_help'),
-    'access arguments' => array('administer tripal'),
-    'type' => MENU_LOCAL_TASK,
-    'weight' => 10
-  );
-  $items['admin/tripal/storage/chado/mviews/report/%'] = array(
-    'title' => 'Materialized View',
-    'description' => t('Materialized views are used to improve speed of large or complex queries. These are database views as compared to Drupal views.'),
-    'page callback' => 'tripal_mview_report',
-    'page arguments' => array(5),
-    'access arguments' => array('administer tripal'),
-    'type' => MENU_CALLBACK,
-  );
-  $items['admin/tripal/storage/chado/mviews/new'] = array(
-    'title' => 'Create Materialized View',
-    'description' => t('Create a new materialized view.'),
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('tripal_mviews_form'),
-    'access arguments' => array('administer tripal'),
-    'type' => MENU_CALLBACK,
-  );
-  $items['admin/tripal/storage/chado/mviews/edit/%'] = array(
-    'title' => 'Edit Materialized View',
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('tripal_mviews_form', 5),
-    'access arguments' => array('administer tripal'),
-    'type' => MENU_CALLBACK,
-  );
-  $items['admin/tripal/storage/chado/mviews/update/%'] = array(
-    'title' => 'Create Materialized View',
-    'description' => t('Materialized views are used to improve speed of large or complex queries.'),
-    'page callback' => 'tripal_mviews_add_populate_job',
-    'page arguments' => array(5),
-    'access arguments' => array('administer tripal'),
-    'type' => MENU_CALLBACK,
-  );
-  $items['admin/tripal/storage/chado/mviews/delete/%'] = array(
-    'title' => 'Create Materialized View',
-    'description' => t('Materialized views are used to improve speed of large or complex queries.'),
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('tripal_mviews_delete_form', 5),
-    'access arguments' => array('administer tripal'),
-    'type' => MENU_CALLBACK,
-  );
-  // TODO: complete the code for exporting and importing of MViews.
-  // Need to address security issues of sharing SQL.
-  $items['admin/tripal/storage/chado/mviews/import'] = array(
-    'title' => 'Import MView',
-    'description' => 'Import a materialized view from another Tripal instance.',
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('tripal_mviews_import_form'),
-    'access arguments' => array('administer tripal'),
-    'type' => MENU_CALLBACK,
-  );
-  $items['admin/tripal/storage/chado/mviews/%tblid/export'] = array(
-    'title' => 'Export MView',
-    'description' => 'Export a materialized view for use by another Tripal instance.',
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('tripal_mviews_export_form', 5),
-    'access arguments' => array('administer tripal'),
-    'type' => MENU_CALLBACK,
-  );
-
-  // Custom Tables
-  $items['admin/tripal/storage/chado/custom_tables'] = array(
-    'title' => 'Custom Tables',
-    'description' => t('Creation of custom tables that are added to Chado database.'),
-    'page callback' => 'tripal_custom_table_admin_view',
-    'access arguments' => array('administer tripal'),
-    'type' => MENU_NORMAL_ITEM,
-    'weight' => -10
-  );
-  $items['admin/tripal/storage/chado/custom_tables/help'] = array(
-    'title' => 'Help',
-    'description' => t('Help for the tripal job management system'),
-    'page callback' => 'theme',
-    'page arguments' => array('tripal_core_job_help'),
-    'access arguments' => array('administer tripal'),
-    'type' => MENU_LOCAL_TASK,
-    'weight' => 10
-  );
-  $items['admin/tripal/storage/chado/custom_tables/view/%'] = array(
-    'title' => 'Custom Tables',
-    'description' => t('Custom tables are added to Chado.'),
-    'page callback' => 'tripal_custom_table_view',
-    'page arguments' => array(5),
-    'access arguments' => array('administer tripal'),
-    'type' => MENU_CALLBACK,
-  );
-  $items['admin/tripal/storage/chado/custom_tables/new'] = array(
-    'title' => 'Create Custom Table',
-    'description' => t('An interface for creating your own custom tables.'),
-    'page callback' => 'tripal_custom_table_new_page',
-    'access arguments' => array('administer tripal'),
-    'type' => MENU_CALLBACK,
-  );
-  $items['admin/tripal/storage/chado/custom_tables/edit/%'] = array(
-    'title' => 'Edit Custom Table',
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('tripal_custom_tables_form', 5),
-    'access arguments' => array('administer tripal'),
-    'type' => MENU_CALLBACK,
-  );
-  $items['admin/tripal/storage/chado/custom_tables/delete/%'] = array(
-    'title' => 'Create Custom Table',
-    'description' => t('Custom tables are added to Chado.'),
-    'page callback' => 'drupal_get_form',
-    'page arguments' => array('tripal_custom_tables_delete_form', 5),
-    'access arguments' => array('administer tripal'),
-    'type' => MENU_CALLBACK,
-  );
-  $items['admin/tripal/storage/chado/custom_tables/views/tables/enable'] = array(
-    'title' => 'Enable Custom Tables Administrative View',
-    'page callback' => 'tripal_enable_view',
-    'page arguments' => array('tripal_core_admin_custom_table', 'admin/tripal/storage/chado/custom_tables'),
-    'access arguments' => array('administer tripal'),
-    'type' => MENU_CALLBACK,
-  );
-
   // Relationshi API autocomplete callback
   $items['tripal_ajax/relationship_nodeform/%/%/name_to_id'] = array(
     'page callback' => 'chado_add_node_form_relationships_name_to_id_callback',
@@ -387,15 +68,6 @@ function tripal_core_menu() {
     'file' => '/includes/tripal_core.toc.inc',
   );
 
-  // Web Services API callbacks.
-//   $items['ws/chado/v0.1'] = array(
-//     'title' => 'Tripal Web Services API v0.1',
-//     'page callback' => 'tripal_core_chado_hal_api',
-//     'access arguments' => array('access content'),
-//     'type' => MENU_CALLBACK,
-//     'file' => '/includes/tripal_core.ws_hal.inc',
-//   );
-
   return $items;
 }
 
@@ -427,35 +99,7 @@ function tripal_core_access_node_toc_form($node) {
  * @ingroup tripal_core
  */
 function tripal_core_permission() {
-  return array(
-    'install chado' => array(
-      'title' => t('Install Chado'),
-      'description' => t('Allow the user to install or upgrade a Chado database in the existing Drupal database.')
-    ),
-    'administer tripal' => array(
-      'title' => t('Administer Tripal'),
-      'description' => t('Allow the user to access administrative pages of Tripal.')
-    ),
-    'view dev helps' => array(
-      'title' => t('View Developer Hints'),
-      'description' => t('Tripal will provide blue shaded boxes that provide
-          instructions for how to customize or setup specific pages on a
-          site.  This permission should be enabled for developers. But can
-          be disabled once developers are accustomed to these hints.'),
-      'restrict access' => TRUE,
-    ),
-    'view ids' => array(
-      'title' => t('View Internal IDs'),
-      'description' => t('On content pages Tripal will typically provide
-          a table of information pulled from the Chado database but the
-          primary key IDs for that data is typically not shown.  The
-          default Tripal templates can show the primary key ID inside of a
-          blue shaded table row if this permission is enabled. This can
-          be useful for site developers who might want these IDs when working
-          with the underlying database.'),
-      'restrict access' => TRUE,
-    )
-  );
+  return array();
 }
 
 /**
@@ -506,13 +150,6 @@ function tripal_core_theme($existing, $type, $theme, $path) {
       'render element' => 'element',
     ),
 
-    // Admin messages theme
-    // --------------------------------
-    'tripal_admin_message' => array(
-      'function' => 'theme_tripal_admin_message',
-      'variables' => array('message' => NULL),
-    ),
-
     // Form and form element themes.
     // --------------------------------
     'tripal_node_toc_items_table' => array(
@@ -525,55 +162,12 @@ function tripal_core_theme($existing, $type, $theme, $path) {
   );
 }
 
-
 /**
- * Implements hook_job_describe_args().
- * Describes the arguements for the tripal_populate_mview job to allow for greater
- * readability in the jobs details pages.
- *
- * @param $callback
- *   The callback of the current tripal job (this is the function that will be executed
- *   when tripal_launch_jobs.php is run.
- * @param $args
- *   An array of arguments passed in when the job was registered.
- *
- * @return
- *   A more readable $args array
+ * Implements hook_coder_ignore().
  *
- * @ingroup tripal_core
- */
-function tripal_core_job_describe_args($callback, $args) {
-  $new_args = array();
-  if ($callback == 'tripal_populate_mview') {
-    // get this mview details
-    $sql = "SELECT * FROM {tripal_mviews} WHERE mview_id = :mview_id ";
-    $results = db_query($sql, array(':mview_id' => $args[0]));
-    $mview = $results->fetchObject();
-    $new_args['View Name'] = $mview->name;
-  }
-
-  elseif ($callback == 'tripal_core_install_chado') {
-     $new_args['Action'] = $args[0];
-  }
-  return $new_args;
-}
-
-/**
- * this is just a wrapper for backwards compatibility with a naming mistake.
- * it can go away in the future as it only is useful for jobs created by v0.3b
+ * Defines the path to the file (tripal_core.coder_ignores.txt) where ignore
+ * rules for coder are stored.
  *
- * @todo remove this function
- */
-function tripal_core_load_gff3($gff_file, $organism_id, $analysis_id, $add_only = 0,
-  $update = 0, $refresh = 0, $remove = 0, $job = NULL) {
-
-  tripal_feature_load_gff3($gff_file, $organism_id, $analysis_id, $add_only,
-    $update, $refresh, $remove, $job);
-}
-
-/**
- * Implements hook_coder_ignore().
- * Defines the path to the file (tripal_core.coder_ignores.txt) where ignore rules for coder are stored
  */
 function tripal_core_coder_ignore() {
   return array(
@@ -583,12 +177,13 @@ function tripal_core_coder_ignore() {
 }
 
 /**
- * Implements hook_views_api()
- * Purpose: Essentially this hook tells drupal that there is views support for
- *  for this module which then includes tripal_db.views.inc where all the
- *  views integration code is
+ * Implements hook_views_api().
  *
- * @ingroup tripal_organism
+ * Essentially this hook tells drupal that there is views support for
+ * for this module which then includes tripal_db.views.inc where all the
+ * views integration code is.
+ *
+ * @ingroup tripal_core
  */
 function tripal_core_views_api() {
   return array(
@@ -597,9 +192,9 @@ function tripal_core_views_api() {
 }
 
 /**
- * Implements hook_node_view_alter()
+ * Implements hook_node_view_alter().
  *
- * @param unknown $build
+ * @ingroup tripal_core
  */
 function tripal_core_node_view_alter(&$build) {
   module_load_include('inc', 'tripal_core', 'includes/tripal_core.toc');
@@ -607,7 +202,7 @@ function tripal_core_node_view_alter(&$build) {
 }
 
 /**
- * Implements hook_node_view()
+ * Implements hook_node_view().
  *
  * @ingroup tripal_core
  */
@@ -629,25 +224,27 @@ function tripal_core_node_view($node, $view_mode, $langcode) {
 /**
  * Implements hook_exclude_type_by_default()
  *
- * This hooks allows fields of a specified type that match a specified criteria to be excluded by
- * default from any table when chado_generate_var() is called. Keep in mind that if
- * fields are excluded by default they can always be expanded at a later date using
- * chado_expand_var().
+ * This hooks allows fields of a specified type that match a specified criteria
+ * to be excluded by default from any table when chado_generate_var() is called.
+ * Keep in mind that if fields are excluded by default they can always be
+ * expanded at a later date using chado_expand_var().
  *
- * Criteria are php strings that evaluate to either TRUE or FALSE. These strings are evaluated using
- * drupal_eval() which suppresses syntax errors and throws watchdog entries of type php. There are
- * also watchdog entries of type tripal_core stating the exact criteria evaluated. Criteria can
+ * Criteria are php strings that evaluate to either TRUE or FALSE. These
+ * strings are evaluated using drupal_eval() which suppresses syntax errors
+ * and throws watchdog entries of type php. There are also watchdog entries of
+ * type tripal_core stating the exact criteria evaluated. Criteria can
  * contain the following tokens:
  *   - <field_name>
  *       Replaced by the name of the field to be excluded
  *   - <field_value>
  *       Replaced by the value of the field in the current record
- * Also keep in mind that if your criteria doesn't contain the &gt;field_value&lt;  token then it will be
- * evaluated before the query is executed and if the field is excluded it won't be included in the
- * query.
+ * Also keep in mind that if your criteria doesn't contain the
+ * &gt;field_value&lt;  token then it will be evaluated before the query is
+ * executed and if the field is excluded it won't be included in the query.
  *
  * @return
- *   An array of type => criteria where the type is excluded if the criteria evaluates to TRUE
+ *   An array of type => criteria where the type is excluded if the criteria
+ *   evaluates to TRUE
  *
  * @ingroup tripal_core
  */

+ 0 - 58
legacy/tripal_core/tripal_launch_jobs.php

@@ -1,58 +0,0 @@
-<?php
-
-/**
- * @file
- * This script will launch any waiting tripal jobs in succession.
- *
- * This script must be run at the base directory level of the drupal installation
- * in order to pick up all necessary dependencies
- */
-
-$stdout = fopen('php://stdout', 'w');
-
-// we require one command-line argument
-if (sizeof($argv) < 2) {
-  print_usage($stdout);
-  exit;
-}
-
-$drupal_base_url = parse_url('http://www.example.com');
-$_SERVER['HTTP_HOST'] = $drupal_base_url['host'];
-//  $_SERVER['PHP_SELF'] = $drupal_base_url['path'].'/index.php';
-$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] = $_SERVER['PHP_SELF'];
-$_SERVER['REMOTE_ADDR'] = NULL;
-$_SERVER['REQUEST_METHOD'] = NULL;
-
-require_once 'includes/bootstrap.inc';
-drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
-
-// check to make sure the username is valid
-$username = $argv[1];
-$do_parallel = $argv[2];
-$results = db_query("SELECT * FROM {users} WHERE name = :name", array(':name' => $username));
-$u = $results->fetchObject();
-if (!$u) {
-  fwrite($stdout, "'$username' is not a valid Drupal username. exiting...\n");
-  exit;
-}
-
-global $user;
-$user = user_load($u->uid);
-
-
-fwrite($stdout, "Tripal Job Launcher\n");
-fwrite($stdout, "Running as user ' . $username . '\n");
-fwrite($stdout, "-------------------\n");
-
-tripal_launch_job($do_parallel);
-
-/**
- * Print out the usage instructions if they are not followed correctly
- *
- * @ingroup tripal_core
- */
-function print_usage($stdout) {
-  fwrite($stdout, "Usage:\n");
-  fwrite($stdout, "  php ./sites/all/modules/tripal_core/tripal_launch_jobs <username> \n\n");
-  fwrite($stdout, "    where <username> is a Drupal user name\n\n");
-}

+ 0 - 114
legacy/tripal_core/tripal_launch_jobs_multi.php

@@ -1,114 +0,0 @@
-<?php
-
-/**
- * @file
- * This script can be used to launch jobs on a multi-site Drupal installation
- */
-
-include_once './includes/bootstrap.inc';
-
-fwrite(STDOUT, "Running Tripal Job Launcher\n");
-
-/**
- * SETTINGS
- */
-
-//the location of the 'sites' directory relative to this script.
-$sites_dir = 'sites';
-$debug=0;
-
-/**
- * END SETTINGS
- */
-
-//error_reporting(E_ALL);
-
-include ("Console/Getopt.php");
-
-// initialize object
-$cg = new Console_Getopt();
-
-/* define list of allowed options - p = h:sitename, u:username  */
-$allowed_short_options = "h:u:";
-
-// read the command line
-$args = $cg->readPHPArgv();
-
-// get the options
-$ret = $cg->getopt($args, $allowed_short_options);
-
-// check for errors and die with an error message if there was a problem
-if (PEAR::isError($ret)) {
-    die("Error in command line: " . $ret->getMessage() . "\n");
-}
-
-ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . './scripts');
-
-/*
- * This doesn't work in every case: getopt function is not always available
-  $options = getopt("h:r:");
-  var_dump($options);
- */
-
-$hostname = "";
-$username = "";
-
-// parse the options array
-$opts = $ret[0];
-if (sizeof($opts) > 0) {
-    // if at least one option is present
-    foreach ($opts as $opt) {
-        switch ($opt[0]) {
-            case 'h':
-                $hostname = $opt[1];
-                break;
-            case 'u':
-                $username = $opt[1];
-                break;
-            default:
-                fwrite(STDOUT, 'Usage: \n');
-                fwrite(STDOUT, '- h hostname\n');
-                fwrite(STDOUT, " -u username\n");
-                break;
-
-        }
-    }
-}
-else {
-  fwrite(STDOUT, "Usage: \n");
-  fwrite(STDOUT, " -h hostname\n");
-  fwrite(STDOUT, " -u username\n");
-
-}
-
-runjob($hostname, $username);
-
-/**
- * Runs tripal_launch_jobs() as the specified user
- *
- * @ingroup tripal_core
- */
-function runjob($sitename, $username) {
-  global $user;
-
-  $_SERVER['SCRIPT_NAME'] = '/sites/all/modules/tripal_jobs/tripal_launch_jobs_multi.php';
-  $_SERVER['SCRIPT_FILENAME'] = '/sites/all/modules/tripal_jobs/tripal_launch_jobs_multi.php';
-  $_SERVER['HTTP_HOST'] = $sitename;
-  $_SERVER['REMOTE_ADDR'] = 'localhost';
-  $_SERVER['REQUEST_METHOD'] = 'GET';
-
-  drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
-
-  // check to make sure the username is valid
-  $results = db_query("SELECT * FROM {users} WHERE name = :name", array(':name' => $username));
-  $u = $results->fetchObject();
-  if (!$u) {
-    fwrite($stdout, "'$username' is not a valid Drupal username. exiting...\n");
-    exit;
-  }
-
-  global $user;
-  $user = user_load($u->uid);
-
-  tripal_launch_job();
-}

+ 4 - 0
tripal/tripal.install

@@ -179,6 +179,10 @@ function tripal_tripal_jobs_schema() {
     'primary key' => array('job_id'),
   );
 }
+/**
+ *
+ * @return
+ */
 function tripal_tripal_token_formats_schema() {
   return array(
     'fields' => array(

+ 0 - 4
tripal/tripal.module

@@ -291,10 +291,6 @@ function tripal_theme($existing, $type, $theme, $path) {
       'function' => 'theme_tripal_admin_message',
       'variables' => array('message' => NULL),
     ),
-    // Theme function for the extension admin page.
-    'tripal_extensions_form_tables' => array(
-      'render element' => 'element',
-    ),
     'tripal_entity' => array(
       'render element' => 'elements',
       'template' => 'tripal_entity',

+ 1 - 1
tripal_chado/tripal_chado.module

@@ -1487,7 +1487,7 @@ function tripal_chado_exclude_type_by_default() {
  *
  * @ingroup tripal
  */
-function tripal_chado_describe_args($callback, $args) {
+function tripal_chado_job_describe_args($callback, $args) {
   $new_args = array();
   if ($callback == 'tripal_populate_mview') {
     // get this mview details

+ 2 - 1
tripal_panes/theme/templates/tripal_panes_generic.tpl.php

@@ -17,10 +17,11 @@ $bundle = $variables['element']['#bundle'];
 
 $bundle_type = $bundle->name . '-' . $bundle->label;
 
-// Process fields in panes
 $content = '';
 $toc = '';
 $has_base_pane_only = TRUE;
+
+// Iterate through all of the panes.
 foreach ($panes AS $pane_id => $pane) {
   if ($pane->name != 'te_base') {
     $has_base_pane_only = FALSE;