mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
prevent SQL error if for what every reason an invalid org_view was set (eg. just a contact_id, instead of string starting with "org_name")
This commit is contained in:
parent
90214935be
commit
7a5b2a59b1
@ -732,7 +732,7 @@ class addressbook_ui extends addressbook_bo
|
||||
if ($name) $org_name[] = $name;
|
||||
}
|
||||
$org_name = implode(': ',$org_name);
|
||||
return array($org => $org_name);
|
||||
return $org_name ? array($org => $org_name) : array();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1387,9 +1387,13 @@ window.egw_LAB.wait(function() {
|
||||
foreach(explode('|||',$query['org_view']) as $part)
|
||||
{
|
||||
list($name,$value) = explode(':',$part,2);
|
||||
// do NOT set invalid column, as this gives an SQL error ("AND AND" in sql)
|
||||
if (in_array($name, array('org_name','org_unit','adr_one_location')))
|
||||
{
|
||||
$query['col_filter'][$name] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if($query['actions'] && !$query['actions']['edit'])
|
||||
{
|
||||
// Just switched from org view, update actions
|
||||
|
Loading…
Reference in New Issue
Block a user