tripal_db.install 913 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * @file
  4. * Contains functions related to the installation of this module
  5. */
  6. /**
  7. * Implementation of hook_install().
  8. *
  9. * @ingroup tripal_db
  10. */
  11. function tripal_db_install() {
  12. // create the module's data directory
  13. tripal_create_moddir('tripal_db');
  14. }
  15. /**
  16. * Implementation of hook_uninstall().
  17. *
  18. * @ingroup tripal_db
  19. */
  20. function tripal_db_uninstall() {
  21. }
  22. /**
  23. * Implementation of hook_requirements().
  24. */
  25. function tripal_db_requirements($phase) {
  26. $requirements = array();
  27. if ($phase == 'install') {
  28. // make sure chado is installed
  29. $version = tripal_core_set_chado_version();
  30. if ($version == 'not installed') {
  31. $requirements ['tripal_db'] = array(
  32. 'title' => "tripal_db",
  33. 'value' => "ERROR: Chado most be installed before this module can be enabled",
  34. 'severity' => REQUIREMENT_ERROR,
  35. );
  36. }
  37. }
  38. return $requirements;
  39. }