You are here

function openatrium_clean_urls_validate in Open Atrium 7.2

Validate that clean URLs work.

1 string reference to 'openatrium_clean_urls_validate'
openatrium_form_install_configure_form_alter in ./openatrium.profile
Implements hook_form_FORM_ID_alter() for install_configure_form.

File

./openatrium.profile, line 42

Code

function openatrium_clean_urls_validate($form, &$form_state) {

  // We cannot test for clean urls during hook_requirments during intall due to
  // lack of menu to test a url for, so we test here instead.
  // The javascript enables clean urls automatically if they work.
  // Could have just required clean_url, but wanted to customize the error.
  if (empty($form_state['values']['clean_url'])) {
    form_set_error('clean_url', t('Clean Urls must be available and enabled to use OpenAtrium.'));
  }
}