function googleanalytics_update_7005 in Google Analytics 7
Same name and namespace in other branches
- 7.2 googleanalytics.install \googleanalytics_update_7005()
Path visibility filter setting should hide "batch" path.
File
- ./
googleanalytics.install, line 392 - Installation file for Google Analytics module.
Code
function googleanalytics_update_7005() {
// Current pages setting.
$pages = array(
'admin',
'admin/*',
'user/*/*',
'node/add*',
'node/*/*',
);
$diff = array_diff($pages, preg_split('/(\\r\\n?|\\n)/', variable_get('googleanalytics_pages', implode("\n", $pages))));
if (empty($diff)) {
// No diff to previous settings found. Update with new settings.
$pages = array(
'admin',
'admin/*',
'batch',
'node/add*',
'node/*/*',
'user/*/*',
);
variable_set('googleanalytics_pages', implode("\n", $pages));
return t('Added "batch" to path visibility filter setting.');
}
else {
return t('Custom path visibility filter setting found. Update skipped!');
}
}