function piwik_update_6000 in Piwik Web Analytics 7
Same name and namespace in other branches
- 5 piwik.install \piwik_update_6000()
- 6.2 piwik.install \piwik_update_6000()
- 6 piwik.install \piwik_update_6000()
- 7.2 piwik.install \piwik_update_6000()
Change visibility setting for paths.
File
- ./
piwik.install, line 84 - Installation file for Piwik - Web analytics module.
Code
function piwik_update_6000() {
// Orginal pages setting.
$pages = array(
'admin*',
'user*',
'node/add*',
'node/*/*',
);
$diff = array_diff($pages, preg_split('/(\\r\\n?|\\n)/', variable_get('piwik_pages', implode("\n", $pages))));
if (empty($diff)) {
// No diff to original settings found. Update with new settings.
$pages = array(
'admin',
'admin/*',
'user/*/*',
'node/add*',
'node/*/*',
);
variable_set('piwik_pages', implode("\n", $pages));
return t('Path visibility filter setting changed from "admin*" to "admin, admin/*" and "user*" changed to "user/*/*".');
}
else {
return t('Custom path visibility filter setting found. Update skipped!');
}
}