From 7cb135c43e90796d212fce8fd1ac0e66794afba4 Mon Sep 17 00:00:00 2001 From: ralf Date: Tue, 15 Oct 2024 11:53:20 +0200 Subject: [PATCH] support CFs for multiple types in the type-filter --- admin/inc/class.admin_customfields.inc.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/admin/inc/class.admin_customfields.inc.php b/admin/inc/class.admin_customfields.inc.php index 79e3209492..5f82ff354e 100644 --- a/admin/inc/class.admin_customfields.inc.php +++ b/admin/inc/class.admin_customfields.inc.php @@ -67,6 +67,15 @@ class admin_customfields */ protected $content_type = null; + /** + * @var Api\Storage\Base + */ + protected $so; + /** + * @var Api\Db + */ + protected $db; + var $public_functions = array( 'index' => true, 'edit' => True @@ -124,6 +133,7 @@ class admin_customfields $this->content_types = Api\Config::get_content_types($this->appname); } $this->so = new Api\Storage\Base('api','egw_customfields',null,'',true); + $this->db = $GLOBALS['egw']->db; // Make sure app css & lang get loaded, extending app might cause et2 to miss it Framework::includeCSS('admin','app'); @@ -764,7 +774,7 @@ class admin_customfields } else { - $query['col_filter'][0] = '(cf_type2 IS NULL OR cf_type2='.$GLOBALS['egw']->db->quote($t2).')'; + $query['col_filter'][0] = '(cf_type2 IS NULL OR '.$this->db->concat("','", 'cf_type2', "','").' LIKE '.$GLOBALS['egw']->db->quote('%,'.$t2.',%').')'; } unset($query['col_filter']['cf_type2']); }