Solved errors in mobile events view
This commit is contained in:
parent
6353af0482
commit
da91b4d25f
|
@ -95,7 +95,7 @@ function events_get_events ($filter = false, $fields = false) {
|
|||
*
|
||||
* @return mixed False in case of error or invalid values passed. Event row otherwise
|
||||
*/
|
||||
function events_get_event ($id, $fields = false) {
|
||||
function events_get_event ($id, $fields = false, $meta = false) {
|
||||
if (empty ($id))
|
||||
return false;
|
||||
global $config;
|
||||
|
@ -105,7 +105,11 @@ function events_get_event ($id, $fields = false) {
|
|||
$fields[] = 'id_grupo';
|
||||
}
|
||||
|
||||
if ($meta === true){
|
||||
$event = db_get_row ('tmetaconsole_event', 'id_evento', $id, $fiel ds);
|
||||
}else{
|
||||
$event = db_get_row ('tevento', 'id_evento', $id, $fields);
|
||||
}
|
||||
if (! check_acl ($config['id_user'], $event['id_grupo'], 'ER'))
|
||||
return false;
|
||||
|
||||
|
|
|
@ -297,7 +297,7 @@ class Events {
|
|||
|
||||
$id_event = $system->getRequest('id_event', 0);
|
||||
|
||||
if (events_change_status($id_event, EVENT_VALIDATE)) {
|
||||
if (events_change_status($id_event, EVENT_VALIDATE,$system->getConfig('metaconsole'))) {
|
||||
echo json_encode(array('correct' => 1));
|
||||
}
|
||||
else {
|
||||
|
@ -379,11 +379,15 @@ class Events {
|
|||
$this->default_filters['severity'] = false;
|
||||
}
|
||||
|
||||
$this->filter = $system->getRequest('filter', __('Preset Filters'));
|
||||
if (($this->filter === __("Preset Filters")) || ($this->filter == 0)) {
|
||||
$this->filter = 0;
|
||||
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'));
|
||||
}
|
||||
else {
|
||||
$this->filter = $system->getRequest('filter', __('Preset Filters'));
|
||||
}
|
||||
|
||||
if ($this->filter != 0) {
|
||||
$this->default = false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue