forked from extern/egroupware
skip notifications on second write in infolog_ui::edit(), used to update just the link_id: causes double notification for new infologs
This commit is contained in:
parent
930f1052d5
commit
f0f6047658
@ -653,10 +653,11 @@ class infolog_bo
|
|||||||
* @param boolean $check_defaults=true check and set certain defaults
|
* @param boolean $check_defaults=true check and set certain defaults
|
||||||
* @param boolean $touch_modified=true touch the modification data and sets the modiefier's user-id
|
* @param boolean $touch_modified=true touch the modification data and sets the modiefier's user-id
|
||||||
* @param boolean $user2server=true conversion between user- and server-time necessary
|
* @param boolean $user2server=true conversion between user- and server-time necessary
|
||||||
|
* @param boolean $skip_notification=false true = do NOT send notification, false (default) = send notifications
|
||||||
*
|
*
|
||||||
* @return int/boolean info_id on a successfull write or false
|
* @return int/boolean info_id on a successfull write or false
|
||||||
*/
|
*/
|
||||||
function write(&$values, $check_defaults=true, $touch_modified=true, $user2server=true)
|
function write(&$values, $check_defaults=true, $touch_modified=true, $user2server=true, $skip_notification=false)
|
||||||
{
|
{
|
||||||
//echo "boinfolog::write()values="; _debug_array($values);
|
//echo "boinfolog::write()values="; _debug_array($values);
|
||||||
if (!$values['info_id'] && !$this->check_access(0,EGW_ACL_EDIT,$values['info_owner']) &&
|
if (!$values['info_id'] && !$this->check_access(0,EGW_ACL_EDIT,$values['info_owner']) &&
|
||||||
@ -891,7 +892,8 @@ class infolog_bo
|
|||||||
{
|
{
|
||||||
$to_write = array_merge($to_write,$missing_fields);
|
$to_write = array_merge($to_write,$missing_fields);
|
||||||
}
|
}
|
||||||
$this->tracking->track($to_write,$old,$this->user,$values['info_status'] == 'deleted' || $old['info_status'] == 'deleted');
|
$this->tracking->track($to_write,$old,$this->user,$values['info_status'] == 'deleted' || $old['info_status'] == 'deleted',
|
||||||
|
null,$skip_notification);
|
||||||
}
|
}
|
||||||
if ($info_from_set) $values['info_from'] = '';
|
if ($info_from_set) $values['info_from'] = '';
|
||||||
|
|
||||||
|
@ -967,7 +967,8 @@ class infolog_ui
|
|||||||
'info_custom_from' => $content['info_custom_from'],
|
'info_custom_from' => $content['info_custom_from'],
|
||||||
);
|
);
|
||||||
//echo "<p>updating info_link_id: ".print_r($to_write,true)."</p>\n";
|
//echo "<p>updating info_link_id: ".print_r($to_write,true)."</p>\n";
|
||||||
$this->bo->write($to_write,False);
|
$this->bo->write($to_write,False,true,true,true); // last true = no notifications, as no real change
|
||||||
|
|
||||||
// we need eg. the new modification date, for further updates
|
// we need eg. the new modification date, for further updates
|
||||||
$content = array_merge($content,$to_write);
|
$content = array_merge($content,$to_write);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user