function readonlymode_form_validate_url in Read only mode 6
Same name and namespace in other branches
- 7 readonlymode.module \readonlymode_form_validate_url()
Implementation of hook_form_validate().
1 string reference to 'readonlymode_form_validate_url'
- readonlymode_form_system_site_maintenance_settings_alter in ./
readonlymode.module - Implementation of hook_form_FORM_ID_alter(). Alter the Site Maintenance form
File
- ./
readonlymode.module, line 140 - Read Only Mode provides an alternate to the built in 'Maintenance Mode' in Drupal. Instead of displaying a static text file to users while the site is in maintenance mode, Read Only Mode will allow access (reading) of new content while…
Code
function readonlymode_form_validate_url(&$form, $form_state) {
if ($path = $form_state['values']['site_readonly_url']) {
$item = menu_get_item($path);
if (!$item || !$item['access']) {
form_set_error('site_readonly_url', t('The path %link_path is either invalid or you do not have access to it.', array(
'%link_path' => $path,
)));
}
}
}