diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2012-01-09 23:14:11 +0100 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2012-01-09 23:14:11 +0100 |
commit | aadb81a32ac521058cb4bafe052f39f24ac9dc8e (patch) | |
tree | f5abf56cba1890139126801cfca47bbc691ce393 | |
parent | ac63afbd95b87475f9f6bf4eae76540cb70d05fb (diff) | |
download | nextcloud-server-aadb81a32ac521058cb4bafe052f39f24ac9dc8e.tar.gz nextcloud-server-aadb81a32ac521058cb4bafe052f39f24ac9dc8e.zip |
OC_DB::insertid was being called too late to get the correct result.
-rw-r--r-- | apps/contacts/lib/vcard.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/contacts/lib/vcard.php b/apps/contacts/lib/vcard.php index beb291b481e..6a248ff59e4 100644 --- a/apps/contacts/lib/vcard.php +++ b/apps/contacts/lib/vcard.php @@ -130,10 +130,11 @@ class OC_Contacts_VCard{ $stmt = OC_DB::prepare( 'INSERT INTO *PREFIX*contacts_cards (addressbookid,fullname,carddata,uri,lastmodified) VALUES(?,?,?,?,?)' ); $result = $stmt->execute(array($id,$fn,$data,$uri,time())); + $newid = OC_DB::insertid('*PREFIX*contacts_cards'); OC_Contacts_Addressbook::touch($id); - return OC_DB::insertid('*PREFIX*contacts_cards'); + return $newid; } /** |