1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-11-29 11:24:11 +01:00

OC_DB::insertid was being called too late to get the correct result.

This commit is contained in:
Thomas Tanghus 2012-01-09 23:14:11 +01:00
parent 82148746d3
commit 6e88659b69

View File

@ -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;
}
/**