function statcounter_clear_js_cache in StatCounter 7.2
Delete cached files and directory.
2 calls to statcounter_clear_js_cache()
- statcounter_admin_settings_form_validate in ./
statcounter.admin.inc - statcounter_disable in ./
statcounter.install - Remove cache directory if module is disabled (or uninstalled).
File
- ./
statcounter.module, line 247 - Drupal Module: Statcounter Adds the required Javascript to the bottom of all your Drupal pages to allow tracking by the Statcounter statistics service.
Code
function statcounter_clear_js_cache() {
$path = 'public://statcounter';
if (file_prepare_directory($path)) {
file_scan_directory($path, '/.*/', array(
'callback' => 'file_unmanaged_delete',
));
drupal_rmdir($path);
// Change query-strings on css/js files to enforce reload for all users.
_drupal_flush_css_js();
watchdog('statcounter', 'Local cache has been purged.', array(), WATCHDOG_INFO);
}
}