From 05ba42ae8b13b080d8ab78c2012ed01fa57ad0f3 Mon Sep 17 00:00:00 2001 From: Brice Maron Date: Sat, 29 Oct 2011 11:40:48 +0200 Subject: [PATCH] Add sequence name in insertid to be more portable --- lib/addressbook.php | 4 ++-- lib/vcard.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/addressbook.php b/lib/addressbook.php index 2e869d7d..87477ed7 100644 --- a/lib/addressbook.php +++ b/lib/addressbook.php @@ -96,7 +96,7 @@ class OC_Contacts_Addressbook{ $stmt = OC_DB::prepare( 'INSERT INTO *PREFIX*contacts_addressbooks (userid,displayname,uri,description,ctag) VALUES(?,?,?,?,?)' ); $result = $stmt->execute(array($userid,$name,$uri,$description,1)); - return OC_DB::insertid(); + return OC_DB::insertid('*PREFIX*contacts_addressbooks'); } /** @@ -113,7 +113,7 @@ class OC_Contacts_Addressbook{ $stmt = OC_DB::prepare( 'INSERT INTO *PREFIX*contacts_addressbooks (userid,displayname,uri,description,ctag) VALUES(?,?,?,?,?)' ); $result = $stmt->execute(array($userid,$name,$uri,$description,1)); - return OC_DB::insertid(); + return OC_DB::insertid('*PREFIX*contacts_addressbooks'); } /** diff --git a/lib/vcard.php b/lib/vcard.php index 74bc0f92..adfa32b6 100644 --- a/lib/vcard.php +++ b/lib/vcard.php @@ -121,7 +121,7 @@ class OC_Contacts_VCard{ OC_Contacts_Addressbook::touch($id); - return OC_DB::insertid(); + return OC_DB::insertid('*PREFIX*contacts_cards'); } /** @@ -147,7 +147,7 @@ class OC_Contacts_VCard{ OC_Contacts_Addressbook::touch($id); - return OC_DB::insertid(); + return OC_DB::insertid('*PREFIX*contacts_cards'); } /**