You are here

function node_gallery_requirements in Node Gallery 6.2

Same name and namespace in other branches
  1. 6.3 node_gallery.install \node_gallery_requirements()

Implementation of hook_requirements()

File

./node_gallery.install, line 62
Node gallery install file.

Code

function node_gallery_requirements($phase) {
  $requirements = array();
  $t = get_t();
  switch ($phase) {
    case 'install':
      $error = FALSE;

      // If ImageCache is not installed already, node_gallery.install code will fail and the system will be in a 'broken' state.
      if (!module_exists('imagecache')) {
        $requirements['node_gallery'] = array(
          'title' => $t('Node Gallery requires'),
          'value' => $t(' ImageCache module to be pre-installed. If ImageCache is now installed, please enable Node Gallery again.'),
          'severity' => REQUIREMENT_ERROR,
        );
      }
      break;
  }
  return $requirements;
}