function __acquia_purge_manualpurge_submit in Acquia Purge 7
Form submit callback.
See also
acquia_purge_manualpurge_form_full()
acquia_purge_manualpurge_form_paths()
acquia_purge_manualpurge_form_page()
1 call to __acquia_purge_manualpurge_submit()
- _acquia_purge_manualpurge_submit in ./
acquia_purge.module - Manual purge form: require inclusion wrapper.
File
- ./
acquia_purge.admin.inc, line 331 - Admin page callbacks and theme functions for the Acquia Purge module.
Code
function __acquia_purge_manualpurge_submit($form, &$form_state) {
if (!isset($form_state['values']['paths']['path'])) {
return;
}
if (!count($form_state['values']['paths']['path'])) {
return;
}
// Improve the administrative experience by automatically adding variations
// on the given paths, which includes trailing slash versions and pagination.
if (_acquia_purge_variable('acquia_purge_variations')) {
_acquia_purge_input_path_variations($form_state['values']['paths']['path']);
}
// Notify when there is no other visual feedback to be expected.
if (_acquia_purge_variable('acquia_purge_silentmode')) {
drupal_set_message(t('The requested content will be invalidated quickly.'));
}
// Only submit the paths if they really contain something.
if (count($form_state['values']['paths']['path'])) {
_acquia_purge_service()
->addPaths($form_state['values']['paths']['path']);
}
}