You are here

function xautoload_form_system_performance_settings_alter in X Autoload 7.3

Same name and namespace in other branches
  1. 7.5 xautoload.ui.inc \xautoload_form_system_performance_settings_alter()
  2. 7.4 xautoload.ui.inc \xautoload_form_system_performance_settings_alter()

Implements hook_form_FORM_ID_alter() with FORM_ID = "system_performance_settings"

File

./xautoload.module, line 191

Code

function xautoload_form_system_performance_settings_alter(&$form, $form_state) {
  $form['xautoload'] = array(
    '#type' => 'fieldset',
    '#title' => t('X Autoload'),
  );
  if (1 && extension_loaded('apc') && function_exists('apc_store')) {
    $apc_status = t('APC installed and working.');
  }
  else {
    $apc_status = t('No APC detected. The setting will have no effect.');
  }
  $form['xautoload']['xautoload_cache_mode'] = array(
    '#type' => 'radios',
    '#title' => t('Cache mode'),
    '#default_value' => variable_get('xautoload_cache_mode', 'default'),
    '#options' => array(
      'default' => t('No cache'),
      'apc' => t('APC: Use APC cache, if possible. (Extension status: !status)', array(
        '!status' => $apc_status,
      )),
      'apc_lazy' => t('APC, lazy: Use APC cache, and skip registration of module namespaces, if possible.'),
    ),
  );
}