function performance_clear_form_confirm in Performance Logging and Monitoring 6
Same name and namespace in other branches
- 7 performance.module \performance_clear_form_confirm()
Clear data store confirm form callback.
1 call to performance_clear_form_confirm()
- performance_clear_form in ./
performance.module - Clear logs form. This is actually a multistep form: first choose the data store you want to clear, second confirm that you actually want this.
File
- ./
performance.module, line 1227 - Logs detailed and/or summary page generation time and memory consumption for page requests. Copyright Khalid Baheyeldin 2008 of http://2bits.com
Code
function performance_clear_form_confirm(&$form_state) {
$form = array();
$stores = performance_data_stores();
$store = $form_state['storage']['store'];
// Needed because this form is called from another form, see
// performance_clear_form().
$form['#submit'] = array(
'performance_clear_form_confirm_submit',
);
$form['#redirect'] = PERFORMANCE_SETTINGS;
return confirm_form($form, t('Are you sure you want to clear the statistics collected in %store for this site?', array(
'%store' => $stores[$store]['#name'],
)), PERFORMANCE_SETTINGS, t('This will clear <strong>all</strong> the collected performance statistics stored in %store. This action cannot be undone.', array(
'%store' => $stores[$store]['#name'],
)), t('Clear'), t('Cancel'));
}