mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-10 07:21:04 +01:00
Fix importing links
This commit is contained in:
parent
076137ec85
commit
9127fb5d71
@ -487,18 +487,22 @@ case 'import':
|
|||||||
}
|
}
|
||||||
$action = $values['id'] ? 'updating' : 'adding';
|
$action = $values['id'] ? 'updating' : 'adding';
|
||||||
//echo $action.'<pre>'.print_r($values,True)."</pre>\n";
|
//echo $action.'<pre>'.print_r($values,True)."</pre>\n";
|
||||||
|
|
||||||
|
// Keep links, $cal->update will remove them
|
||||||
|
$links = array(
|
||||||
|
'addr_id' => 'addressbook:' . $values['addr_id'],
|
||||||
|
'link_1' => $values['link_1'],
|
||||||
|
'link_2' => $values['link_2'],
|
||||||
|
'link_3' => $values['link_3'],
|
||||||
|
);
|
||||||
if (!$_POST['debug'] &&
|
if (!$_POST['debug'] &&
|
||||||
($cal_id = $cal->update($values,true,!$values['modified'],$is_admin))) // ignoring conflicts and ACL (for admins) on import
|
($cal_id = $cal->update($values,true,!$values['modified'],$is_admin))) // ignoring conflicts and ACL (for admins) on import
|
||||||
{
|
{
|
||||||
foreach(array(
|
foreach($links as $value) {
|
||||||
'addressbook:'.$values['addr_id'],
|
|
||||||
$values['link_1'],$values['link_2'],$values['link_3'],
|
|
||||||
) as $value)
|
|
||||||
{
|
|
||||||
list($app,$app_id) = explode(':',$value);
|
list($app,$app_id) = explode(':',$value);
|
||||||
if ($app && $app_id)
|
if ($app && $app_id)
|
||||||
{
|
{
|
||||||
//echo "<p>linking infolog:$id with $app:$app_id</p>\n";
|
//echo "<p>linking calendar:$cal_id with $app:$app_id</p>\n";
|
||||||
egw_link::link('calendar',$cal_id,$app,$app_id);
|
egw_link::link('calendar',$cal_id,$app,$app_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user