mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 08:53:37 +01:00
move "archived too" to NM filters (not status col-filter)
This commit is contained in:
parent
8e209ff7e4
commit
06c83a4547
@ -176,7 +176,8 @@ class infolog_bo
|
|||||||
'upcoming' => 'upcoming',
|
'upcoming' => 'upcoming',
|
||||||
'open-upcoming' => 'open and upcoming',
|
'open-upcoming' => 'open and upcoming',
|
||||||
'bydate' => 'startdate',
|
'bydate' => 'startdate',
|
||||||
'duedate' => 'enddate'
|
'duedate' => 'enddate',
|
||||||
|
'+archived' => 'archived too',
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -298,7 +299,6 @@ class infolog_bo
|
|||||||
if ($type !== 'defaults' && !isset($statis['archive']))
|
if ($type !== 'defaults' && !isset($statis['archive']))
|
||||||
{
|
{
|
||||||
$statis['archive'] = 'archive';
|
$statis['archive'] = 'archive';
|
||||||
$statis['archive_too'] = lang('Archived too');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -305,7 +305,7 @@ class infolog_so
|
|||||||
function statusFilter($_filter = '',$prefix_and=true)
|
function statusFilter($_filter = '',$prefix_and=true)
|
||||||
{
|
{
|
||||||
$vars = null;
|
$vars = null;
|
||||||
preg_match('/(done|open|offer|deleted|\+deleted)/',$_filter,$vars);
|
preg_match('/(done|open|offer|deleted|\+deleted|\+archived)/',$_filter,$vars);
|
||||||
$filter = $vars[1]??null;
|
$filter = $vars[1]??null;
|
||||||
|
|
||||||
switch ($filter)
|
switch ($filter)
|
||||||
@ -315,6 +315,7 @@ class infolog_so
|
|||||||
case 'offer': $filter = "info_status = 'offer'"; break;
|
case 'offer': $filter = "info_status = 'offer'"; break;
|
||||||
case 'deleted': $filter = "info_status = 'deleted'"; break;
|
case 'deleted': $filter = "info_status = 'deleted'"; break;
|
||||||
case '+deleted':$filter = "NOT (info_status IN ('template','nonactive','archive'))"; break;
|
case '+deleted':$filter = "NOT (info_status IN ('template','nonactive','archive'))"; break;
|
||||||
|
case '+archived':$filter = "NOT (info_status IN ('deleted','template','nonactive'))"; break;
|
||||||
default: $filter = "NOT (info_status IN ('deleted','template','nonactive','archive'))"; break;
|
default: $filter = "NOT (info_status IN ('deleted','template','nonactive','archive'))"; break;
|
||||||
}
|
}
|
||||||
return ($prefix_and ? ' AND ' : '').$filter;
|
return ($prefix_and ? ' AND ' : '').$filter;
|
||||||
@ -883,13 +884,6 @@ class infolog_so
|
|||||||
$filtermethod .= ' AND '.$this->db->expression($this->info_table,'main.',array('info_id' => $data));
|
$filtermethod .= ' AND '.$this->db->expression($this->info_table,'main.',array('info_id' => $data));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'info_status':
|
|
||||||
if ($data === 'archive_too')
|
|
||||||
{
|
|
||||||
$filtermethod .= "AND info_status NOT IN ('deleted','template','nonactive')";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
// fall through
|
|
||||||
default:
|
default:
|
||||||
$filtermethod .= ' AND '.$this->db->expression($this->info_table,array($col => $data));
|
$filtermethod .= ' AND '.$this->db->expression($this->info_table,array($col => $data));
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user