You are here

function forena_query_requirements in Forena Reports 8

Same name and namespace in other branches
  1. 7.5 forena_query.module \forena_query_requirements()
  2. 7.4 forena_query.module \forena_query_requirements()

Implmentation of hook_requirements

Parameters

unknown $phase:

File

forena_query/forena_query.module, line 96
Provides the ability to create saved queries and to test sql data blocks.

Code

function forena_query_requirements($phase) {
  $requirements = array();
  switch ($phase) {
    case 'runtime':
      $writeable = is_writable(Frx::DataFile()->dir);
      if (!$writeable) {
        $requirements['fornea_writable'] = array(
          'title' => 'Forena Data Directory',
          'value' => Frx::File()->dir,
          'severity' => REQUIREMENT_ERROR,
          'description' => t('The directory must be writable by the web user in order to create custom SQL data sources. '),
        );
      }
  }
}