From 06c83a454737e3eca383f9db5762fc4dc4d6d304 Mon Sep 17 00:00:00 2001 From: ralf Date: Wed, 3 Apr 2024 10:10:50 +0200 Subject: [PATCH] move "archived too" to NM filters (not status col-filter) --- infolog/inc/class.infolog_bo.inc.php | 4 ++-- infolog/inc/class.infolog_so.inc.php | 10 ++-------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/infolog/inc/class.infolog_bo.inc.php b/infolog/inc/class.infolog_bo.inc.php index 01b50a5a74..32569d97b2 100644 --- a/infolog/inc/class.infolog_bo.inc.php +++ b/infolog/inc/class.infolog_bo.inc.php @@ -176,7 +176,8 @@ class infolog_bo 'upcoming' => 'upcoming', 'open-upcoming' => 'open and upcoming', 'bydate' => 'startdate', - 'duedate' => 'enddate' + 'duedate' => 'enddate', + '+archived' => 'archived too', ); /** @@ -298,7 +299,6 @@ class infolog_bo if ($type !== 'defaults' && !isset($statis['archive'])) { $statis['archive'] = 'archive'; - $statis['archive_too'] = lang('Archived too'); } } } diff --git a/infolog/inc/class.infolog_so.inc.php b/infolog/inc/class.infolog_so.inc.php index 7bf7afaa5c..64deb39adb 100644 --- a/infolog/inc/class.infolog_so.inc.php +++ b/infolog/inc/class.infolog_so.inc.php @@ -305,7 +305,7 @@ class infolog_so function statusFilter($_filter = '',$prefix_and=true) { $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; switch ($filter) @@ -315,6 +315,7 @@ class infolog_so case 'offer': $filter = "info_status = 'offer'"; break; case 'deleted': $filter = "info_status = 'deleted'"; 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; } 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)); break; - case 'info_status': - if ($data === 'archive_too') - { - $filtermethod .= "AND info_status NOT IN ('deleted','template','nonactive')"; - break; - } - // fall through default: $filtermethod .= ' AND '.$this->db->expression($this->info_table,array($col => $data)); break;