mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-01-18 07:52:21 +01:00
Cut some more off of the json response.
This commit is contained in:
parent
de087c822f
commit
3ab079e781
@ -152,7 +152,7 @@ foreach ($parameters as $key=>$element) {
|
||||
}
|
||||
}
|
||||
}
|
||||
$checksum = md5($vcard->children[$line]->serialize());
|
||||
$checksum = substr(md5($vcard->children[$line]->serialize()), 0, 8);
|
||||
|
||||
try {
|
||||
OCA\Contacts\VCard::edit($id, $vcard);
|
||||
|
@ -174,7 +174,7 @@ if(!$value) {
|
||||
}
|
||||
// Do checksum and be happy
|
||||
if(in_array($name, $multi_properties)) {
|
||||
$checksum = md5($property->serialize());
|
||||
$checksum = substr(md5($property->serialize()), 0, 8);
|
||||
}
|
||||
}
|
||||
//debug('New checksum: '.$checksum);
|
||||
|
@ -55,7 +55,7 @@ class App {
|
||||
public static function getPropertyLineByChecksum($vcard, $checksum) {
|
||||
$line = null;
|
||||
for($i=0;$i<count($vcard->children);$i++) {
|
||||
if(md5($vcard->children[$i]->serialize()) == $checksum ) {
|
||||
if(substr(md5($vcard->children[$i]->serialize()), 0, 8) == $checksum ) {
|
||||
$line = $i;
|
||||
break;
|
||||
}
|
||||
|
@ -736,7 +736,7 @@ class VCard {
|
||||
|
||||
// This cuts around a 3rd off of the json response size.
|
||||
if(in_array($property->name, App::$multi_properties)) {
|
||||
$temp['checksum'] = md5($property->serialize());
|
||||
$temp['checksum'] = substr(md5($property->serialize()), 0, 8);
|
||||
}
|
||||
foreach($property->parameters as $parameter) {
|
||||
// Faulty entries by kaddressbook
|
||||
|
Loading…
x
Reference in New Issue
Block a user