function googleanalytics_cron in Google Analytics 6.2
Same name and namespace in other branches
- 5 googleanalytics.module \googleanalytics_cron()
- 6.4 googleanalytics.module \googleanalytics_cron()
- 6 googleanalytics.module \googleanalytics_cron()
- 6.3 googleanalytics.module \googleanalytics_cron()
- 7.2 googleanalytics.module \googleanalytics_cron()
- 7 googleanalytics.module \googleanalytics_cron()
Implementation of hook_cron().
File
- ./
googleanalytics.module, line 213
Code
function googleanalytics_cron() {
// Regenerate the google analytics ga.js every day.
if (time() - variable_get('googleanalytics_last_cache', 0) >= 86400) {
// New google analytics version.
file_delete(file_directory_path() . '/googleanalytics/ga.js');
// Clear aggregated JS files.
if (variable_get('preprocess_js', 0)) {
drupal_clear_js_cache();
}
variable_set('googleanalytics_last_cache', time());
}
}