mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
* InfoLog CSV import: do not notify a 2nd time when primary link get set (UI does not do it either)
fixed wired formatting of 8 space instead of tab and removed xmlrpc like call by introducing new parameter value 2=only update modifier
This commit is contained in:
parent
f467572bd4
commit
cbc87ce197
@ -699,7 +699,7 @@ class infolog_bo
|
|||||||
*
|
*
|
||||||
* @param array &$values values to write
|
* @param array &$values values to write
|
||||||
* @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|int $touch_modified=true touch the modification date and sets the modifier's user-id, 2: only modifier
|
||||||
* @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
|
* @param boolean $skip_notification=false true = do NOT send notification, false (default) = send notifications
|
||||||
* @param boolean $throw_exception=false Throw an exception (if required fields are not set)
|
* @param boolean $throw_exception=false Throw an exception (if required fields are not set)
|
||||||
@ -874,7 +874,7 @@ class infolog_bo
|
|||||||
$this->time2time($values);
|
$this->time2time($values);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($touch_modified || !$values['info_datemodified'])
|
if ($touch_modified && $touch_modified !== 2 || !$values['info_datemodified'])
|
||||||
{
|
{
|
||||||
// Should only an entry be updated which includes the original modification date?
|
// Should only an entry be updated which includes the original modification date?
|
||||||
// Used in the web-GUI to check against a modification by an other user while editing the entry.
|
// Used in the web-GUI to check against a modification by an other user while editing the entry.
|
||||||
|
@ -67,12 +67,14 @@ class infolog_import_infologs_csv implements importexport_iface_import_plugin {
|
|||||||
private $definition;
|
private $definition;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var business object
|
* @var infolog_bo
|
||||||
*/
|
*/
|
||||||
private $boinfolog;
|
private $boinfolog;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For figuring out if a record has changed
|
* For figuring out if a record has changed
|
||||||
|
*
|
||||||
|
* @var infolog_tracking::
|
||||||
*/
|
*/
|
||||||
protected $tracking;
|
protected $tracking;
|
||||||
|
|
||||||
@ -324,9 +326,7 @@ class infolog_import_infologs_csv implements importexport_iface_import_plugin {
|
|||||||
$this->results[$_action]++;
|
$this->results[$_action]++;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
// Fake an XMLRPC call to avoid failing modification date check
|
$result = $this->boinfolog->write( $_data, true, 2); // 2 = dont touch modification date
|
||||||
$GLOBALS['server']->last_method = '~fake it~';
|
|
||||||
$result = $this->boinfolog->write( $_data, true, true);
|
|
||||||
if(!$result) {
|
if(!$result) {
|
||||||
$this->errors[$record_num] = lang('Permissions error - %1 could not %2',
|
$this->errors[$record_num] = lang('Permissions error - %1 could not %2',
|
||||||
$GLOBALS['egw']->accounts->id2name($_data['info_owner']),
|
$GLOBALS['egw']->accounts->id2name($_data['info_owner']),
|
||||||
@ -370,7 +370,7 @@ class infolog_import_infologs_csv implements importexport_iface_import_plugin {
|
|||||||
'info_id' => $id,
|
'info_id' => $id,
|
||||||
'info_link_id' => $link_id,
|
'info_link_id' => $link_id,
|
||||||
);
|
);
|
||||||
$this->boinfolog->write($to_write);
|
$this->boinfolog->write($to_write,False,false,true,true); // last true = no notifications, as no real change
|
||||||
$info_link_id = $link_id;
|
$info_link_id = $link_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -581,4 +581,3 @@ class infolog_import_infologs_csv implements importexport_iface_import_plugin {
|
|||||||
return $app_id;
|
return $app_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
Loading…
Reference in New Issue
Block a user