function tripal_chado_set_globals

3.x tripal_chado.module tripal_chado_set_globals()

This function is used to set the global Chado variables

Related topics

1 call to tripal_chado_set_globals()
tripal_chado.module in tripal_chado/tripal_chado.module
The Tripal Chado module.

File

tripal_chado/tripal_chado.module, line 78
The Tripal Chado module.

Code

function tripal_chado_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);
    $GLOBALS["chado_tables"] = array();
  }
}