You are here

function paranoia_requirements in Paranoia 7

Same name and namespace in other branches
  1. 8 paranoia.install \paranoia_requirements()
  2. 6 paranoia.module \paranoia_requirements()

Implements hook_requirements().

File

./paranoia.install, line 29
Disable php module & set install message for Paranoia.

Code

function paranoia_requirements($phase) {
  $requirements = array();
  if ($phase == 'runtime') {

    // Ensure the PHP module is not enabled.
    if (module_exists('php')) {
      $t = get_t();
      $requirements['paranoia_php'] = array(
        'title' => $t('Paranoia'),
        'description' => $t('The PHP module is enabled. This module should be disabled (but paranoia module prevents it from showing in the module admin form).  It may have been enabled in the database, circumventing the effectiveness of paranoia module.'),
        'severity' => REQUIREMENT_ERROR,
        'value' => '',
      );
    }
  }
  return $requirements;
}