Skip to content
Snippets Groups Projects
Commit aadb81a3 authored by Thomas Tanghus's avatar Thomas Tanghus
Browse files

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

parent ac63afbd
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment