fix SQL error when Db->Type is not "mysql", as it should be, but eg. "mysqli" and therefore PostgesSQL SIMILAR is used with MySQL/MariaDB

This commit is contained in:
Ralf Becker 2016-12-01 12:59:53 +01:00
parent 22c63665fc
commit 655e532ed4

View File

@ -171,7 +171,7 @@ class admin_acl
case 'other':
//$query['col_filter'][] = "acl_location!='run'";
// remove everything not an account-id in location, like category based acl
if ($GLOBALS['egw']->db->Type == 'mysql')
if (substr($GLOBALS['egw']->db->Type, 0, 5) == 'mysql')
{
$query['col_filter'][] = "acl_location REGEXP '^-?[0-9]+$'";
}