From 5428f8d941e482567ba6f247452b81b32c1445c7 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 23 Nov 2007 17:19:38 +0000 Subject: [PATCH] "allow admins to import contacts with creator / created date set" --- addressbook/inc/class.bocontacts.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addressbook/inc/class.bocontacts.inc.php b/addressbook/inc/class.bocontacts.inc.php index 07ecf075dc..a34a3a6e5a 100755 --- a/addressbook/inc/class.bocontacts.inc.php +++ b/addressbook/inc/class.bocontacts.inc.php @@ -463,8 +463,9 @@ class bocontacts extends socontacts // if no owner/addressbook set use the setting of the add_default prefs (if set, otherwise the users personal addressbook) if (!isset($contact['owner'])) $contact['owner'] = (int)$this->prefs['add_default'] ? (int)$this->prefs['add_default'] : $this->user; if (!isset($contact['private'])) $contact['private'] = (int)(substr($this->prefs['add_default'],-1) == 'p'); - $contact['creator'] = $this->user; - $contact['created'] = $this->now_su; + // allow admins to import contacts with creator / created date set + if (!$contact['creator'] || !$this->is_admin($contact)) $contact['creator'] = $this->user; + if (!$contact['created'] || !$this->is_admin($contact)) $contact['created'] = $this->now_su; if (!$contact['tid']) $contact['tid'] = 'n'; }