tripal_db.install 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /*******************************************************************************
  3. * Implementation of hook_install();
  4. */
  5. function tripal_db_install(){
  6. // create the module's data directory
  7. tripal_create_moddir('tripal_db');
  8. }
  9. /*******************************************************************************
  10. * Implementation of hook_uninstall()
  11. */
  12. function tripal_db_uninstall(){
  13. }
  14. /*******************************************************************************
  15. * Implementation of hook_requirements(). Make sure 'Tripal Core' is enabled
  16. * before installation
  17. */
  18. function tripal_db_requirements($phase) {
  19. $requirements = array();
  20. if ($phase == 'install') {
  21. if (!function_exists('tripal_create_moddir')) {
  22. $requirements ['tripal_db'] = array(
  23. 'title' => "tripal_db",
  24. 'value' => "Required modules must be installed first before Tripal DB module can be installed. Please try again.",
  25. 'severity' => REQUIREMENT_ERROR,
  26. );
  27. }
  28. }
  29. return $requirements;
  30. }