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

remotes/origin/stable
Thomas Tanghus 13 years ago
parent ac63afbd95
commit aadb81a32a
  1. 3
      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;
}
/**

Loading…
Cancel
Save