function boost_admin_button_router in Boost 6
5 calls to boost_admin_button_router()
- boost_clear_cache_submit in ./
boost.admin.inc - Flushes boost page cache
- boost_clear_expired_cache_submit in ./
boost.admin.inc - Flushes all expired pages from database
- boost_reset_crawler_submit in ./
boost.admin.inc - Reset Crawler
- boost_reset_database_file_submit in ./
boost.admin.inc - Resets boost database & cache directory
- boost_stop_crawler_submit in ./
boost.admin.inc - Stop Crawler
File
- ./
boost.admin.inc, line 1741 - All the code for the Boost module's administrative interface.
Code
function boost_admin_button_router($number, $first, $form, &$form_state) {
$value = boost_array_find_element_by_key('op', $form);
if (strpos($value, (string) $number) != 1) {
$correct = substr($value, 1, 1);
if ($first) {
watchdog('boost', t('FormAPI Bug Encountered; trying to work around the bug. Given: %given Wanted: %wanted. Are you running an old version of Drupal core? For more information, see: http://drupal.org/node/630000. Please describe which button was clicked and the complete error message.', array(
'%given' => $number,
'%wanted' => $correct,
)));
switch ($correct) {
case 0:
boost_clear_cache_submit($form, $form_state, FALSE);
break;
case 1:
boost_clear_expired_cache_submit($form, $form_state, FALSE);
break;
case 2:
boost_stop_crawler_submit($form, $form_state, FALSE);
break;
case 3:
boost_reset_crawler_submit($form, $form_state, FALSE);
break;
case 4:
boost_reset_database_file_submit($form, $form_state, FALSE);
break;
}
}
else {
drupal_set_message(t('FormAPI Bug Encountered; try again. Given: %given Wanted: %wanted. Are you running an old version of Drupal core? For more information, see: http://drupal.org/node/630000. Please describe which button was clicked and the complete error message.', array(
'%given' => $number,
'%wanted' => $correct,
)), 'error');
}
return FALSE;
}
return TRUE;
}