forked from extern/egroupware
if there is an & within org_name, org_unit and such, the add to org will not work, as the GET Parameter gets splitted by &; ADDITIONAL: if there is any export limit set, pass it on to the nextmatch, to be evaluated by the export
This commit is contained in:
parent
21d2db0e54
commit
2efaf05803
@ -721,7 +721,7 @@ class addressbook_bo extends addressbook_so
|
|||||||
function read_org($org_id)
|
function read_org($org_id)
|
||||||
{
|
{
|
||||||
if (!$org_id) return false;
|
if (!$org_id) return false;
|
||||||
|
if (strpos($org_id,'*AND*')!== false) $org_id = str_replace('*AND*','&',$org_id);
|
||||||
$org = array();
|
$org = array();
|
||||||
foreach(explode('|||',$org_id) as $part)
|
foreach(explode('|||',$org_id) as $part)
|
||||||
{
|
{
|
||||||
|
@ -678,6 +678,7 @@ class addressbook_so
|
|||||||
|
|
||||||
foreach($rows as $n => $row)
|
foreach($rows as $n => $row)
|
||||||
{
|
{
|
||||||
|
if (strpos($row['org_name'],'&')!==false) $row['org_name'] = str_replace('&','*AND*',$row['org_name']); //echo "Ampersand found<br>";
|
||||||
$rows[$n]['id'] = 'org_name:'.$row['org_name'];
|
$rows[$n]['id'] = 'org_name:'.$row['org_name'];
|
||||||
foreach(array(
|
foreach(array(
|
||||||
'org_unit' => lang('departments'),
|
'org_unit' => lang('departments'),
|
||||||
@ -690,6 +691,7 @@ class addressbook_so
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (strpos($row[$by],'&')!==false) $row[$by] = str_replace('&','*AND*',$row[$by]); //echo "Ampersand found<br>";
|
||||||
$rows[$n]['id'] .= '|||'.$by.':'.$row[$by];
|
$rows[$n]['id'] .= '|||'.$by.':'.$row[$by];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -260,6 +260,8 @@ class addressbook_ui extends addressbook_bo
|
|||||||
'vcard' => lang('Export as VCard'), // ToDo: move this to importexport framework
|
'vcard' => lang('Export as VCard'), // ToDo: move this to importexport framework
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
// if there is any export limit set, pass it on to the nextmatch, to be evaluated by the export
|
||||||
|
if (isset($this->config['contact_export_limit']) && (int)$this->config['contact_export_limit']) $content['nm']['export_limit']=$this->config['contact_export_limit'];
|
||||||
$sel_options['action'] += array(
|
$sel_options['action'] += array(
|
||||||
'merge' => lang('Merge into first or account, deletes all other!'),
|
'merge' => lang('Merge into first or account, deletes all other!'),
|
||||||
'cat_add' => lang('Add or delete Categoies'), // add a categirie to multible addresses
|
'cat_add' => lang('Add or delete Categoies'), // add a categirie to multible addresses
|
||||||
@ -317,6 +319,7 @@ class addressbook_ui extends addressbook_bo
|
|||||||
if (!isset($sel_options['org_view'][(string) $content['nm']['org_view']]))
|
if (!isset($sel_options['org_view'][(string) $content['nm']['org_view']]))
|
||||||
{
|
{
|
||||||
$org_name = array();
|
$org_name = array();
|
||||||
|
if (strpos($content['nm']['org_view'],'*AND*')!== false) $content['nm']['org_view'] = str_replace('*AND*','&',$content['nm']['org_view']);
|
||||||
foreach(explode('|||',$content['nm']['org_view']) as $part)
|
foreach(explode('|||',$content['nm']['org_view']) as $part)
|
||||||
{
|
{
|
||||||
list(,$name) = explode(':',$part,2);
|
list(,$name) = explode(':',$part,2);
|
||||||
@ -396,6 +399,7 @@ class addressbook_ui extends addressbook_bo
|
|||||||
if (count($checked) > 1) // use a nicely formatted org-name as title in infolog
|
if (count($checked) > 1) // use a nicely formatted org-name as title in infolog
|
||||||
{
|
{
|
||||||
$parts = array();
|
$parts = array();
|
||||||
|
if (strpos($org,'*AND*')!== false) $org = str_replace('*AND*','&',$org);
|
||||||
foreach(explode('|||',$org) as $part)
|
foreach(explode('|||',$org) as $part)
|
||||||
{
|
{
|
||||||
list(,$part) = explode(':',$part,2);
|
list(,$part) = explode(':',$part,2);
|
||||||
@ -881,6 +885,7 @@ class addressbook_ui extends addressbook_bo
|
|||||||
}
|
}
|
||||||
if ($query['org_view']) // view the contacts of one organisation only
|
if ($query['org_view']) // view the contacts of one organisation only
|
||||||
{
|
{
|
||||||
|
if (strpos($query['org_view'],'*AND*')!== false) $query['org_view'] = str_replace('*AND*','&',$query['org_view']);
|
||||||
foreach(explode('|||',$query['org_view']) as $part)
|
foreach(explode('|||',$query['org_view']) as $part)
|
||||||
{
|
{
|
||||||
list($name,$value) = explode(':',$part,2);
|
list($name,$value) = explode(':',$part,2);
|
||||||
|
Loading…
Reference in New Issue
Block a user