You are here

function apdqc_admin_set_message_if_needed in Asynchronous Prefetch Database Query Cache 7

Warn if apdqc.cache.inc is not included in the cache_backends array.

4 calls to apdqc_admin_set_message_if_needed()
apdqc_admin_devel_admin_settings_form in ./apdqc.admin.inc
Add the apdqc_verbose_devel_output setting to the devel_admin_settings form.
apdqc_admin_operations_form in ./apdqc.admin.inc
Form builder; perform apdqc operations.
apdqc_admin_settings_form in ./apdqc.admin.inc
Form builder; Configure apdqc settings.
apdqc_admin_system_performance_settings_form in ./apdqc.admin.inc
Add various apdqc settings to the system_performance_settings form.

File

./apdqc.admin.inc, line 11
Admin page callbacks for the apdqc module.

Code

function apdqc_admin_set_message_if_needed() {
  $apdqcache_found = FALSE;
  foreach (variable_get('cache_backends', array()) as $include) {
    if (stripos($include, '/apdqc/apdqc.cache.inc') !== FALSE) {
      $apdqcache_found = TRUE;
      break;
    }
  }
  if (!$apdqcache_found) {
    drupal_set_message(t('Be sure to go to the <a href="@url">status report page</a> and fix any issues under APDQC</a>', array(
      '@url' => url('admin/reports/status'),
    )), 'warning');
  }
}