devel_themer.install 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * @file
  4. * Install and uninstall hooks for theme developer
  5. *
  6. */
  7. function devel_themer_requirements($phase) {
  8. // Ensure translations don't break at install time
  9. $t = get_t();
  10. if ($phase == 'install' || $phase == 'runtime') {
  11. // we need the Optimizer check function
  12. drupal_load('module', 'devel');
  13. if (!devel_is_compatible_optimizer()) {
  14. $requirements['optimizer'] = array(
  15. 'title' => $t('Zend Optimizer'),
  16. 'description' => $t('You must disable or upgrade the php Zend Optimizer extension in order to enable this feature. The minimum required version is 3.2.8. Earlier versions of Zend Optimizer are <a href="!url">horribly buggy and segfault your Apache.', array('!url' => url('http://drupal.org/node/126098'))),
  17. 'severity' => REQUIREMENT_ERROR,
  18. );
  19. }
  20. }
  21. return isset($requirements) ? $requirements : array();
  22. }
  23. function devel_themer_update_6000() {
  24. $ret = array();
  25. drupal_install_schema('devel_themer');
  26. return $ret;
  27. }
  28. // We are now using a file based cache to avoid max_packet_size warning.
  29. function devel_themer_update_6001() {
  30. $ret = array();
  31. db_drop_table($ret, 'cache_devel_themer');
  32. return $ret;
  33. }