Included control for user set filter and admin set filter

Former-commit-id: fe0ae14537a558e8f3ce423fd761a653ff8168e7
This commit is contained in:
Kike 2019-01-16 17:53:32 +01:00
parent ab13faa788
commit 65d4c5aab7
1 changed files with 8 additions and 3 deletions

View File

@ -380,9 +380,14 @@ class Events {
}
if ($system->getRequest('filter', __('Preset Filters')) === __("Preset Filters")) {
//Set filter as default user event filter (only first time)
$this->filter = db_get_value('default_event_filter', 'tusuario', 'id_user', $system->getConfig('id_user'));
}
//Set filter as default user event filter (only first time)
$this->filter = db_get_value('default_event_filter', 'tusuario', 'id_user', $system->getConfig('id_user'));
//Use user set default filter if admin set default filter is "none"
if ($this->filter == 0){
$this->filter = db_get_value('id_filter', 'tusuario', 'id_user', $system->getConfig('id_user'));
}
}
else {
$this->filter = $system->getRequest('filter', __('Preset Filters'));
}