mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-01-18 07:52:21 +01:00
sanitize code, remove error_log debug messages
This commit is contained in:
parent
23483e7d68
commit
6920f3c2d9
@ -258,7 +258,6 @@ class Ldap extends AbstractBackend {
|
|||||||
public function getAddressBooksForUser(array $options = array()) {
|
public function getAddressBooksForUser(array $options = array()) {
|
||||||
$addressbookidList = $this->getAddressbookList();
|
$addressbookidList = $this->getAddressbookList();
|
||||||
foreach($addressbookidList as $addressbookid) {
|
foreach($addressbookidList as $addressbookid) {
|
||||||
//error_log(__METHOD__." am i here ? ".$addressbookid);
|
|
||||||
$this->addressbooks[] = self::getAddressBook($addressbookid);
|
$this->addressbooks[] = self::getAddressBook($addressbookid);
|
||||||
}
|
}
|
||||||
return $this->addressbooks;
|
return $this->addressbooks;
|
||||||
@ -476,7 +475,6 @@ class Ldap extends AbstractBackend {
|
|||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getContacts($addressbookid, array $options = array()) {
|
public function getContacts($addressbookid, array $options = array()) {
|
||||||
//error_log("was here ".__METHOD__);
|
|
||||||
$backtrace = debug_backtrace();
|
$backtrace = debug_backtrace();
|
||||||
$trace=array();
|
$trace=array();
|
||||||
foreach ($backtrace as $elt) {
|
foreach ($backtrace as $elt) {
|
||||||
@ -486,7 +484,6 @@ class Ldap extends AbstractBackend {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//error_log(__METHOD__." ".print_r($trace,1));
|
|
||||||
|
|
||||||
$cards = array();
|
$cards = array();
|
||||||
$vcards = array();
|
$vcards = array();
|
||||||
@ -510,7 +507,6 @@ class Ldap extends AbstractBackend {
|
|||||||
isset($options['limit']) ? $options['limit'] : null
|
isset($options['limit']) ? $options['limit'] : null
|
||||||
);
|
);
|
||||||
for ($i=0; $i<$info["count"]; $i++) {
|
for ($i=0; $i<$info["count"]; $i++) {
|
||||||
//error_log(print_r($info[$i], true));
|
|
||||||
$a_card = $this->connector->ldapToVCard($info[$i]);
|
$a_card = $this->connector->ldapToVCard($info[$i]);
|
||||||
$cards[] = self::getSabreFormatCard($addressbookid, $a_card);
|
$cards[] = self::getSabreFormatCard($addressbookid, $a_card);
|
||||||
}
|
}
|
||||||
@ -538,7 +534,6 @@ class Ldap extends AbstractBackend {
|
|||||||
|
|
||||||
$cards = array();
|
$cards = array();
|
||||||
$toReturn = false;
|
$toReturn = false;
|
||||||
self::setLdapParams($addressbookid);
|
|
||||||
if (self::setLdapParams($addressbookid)) {
|
if (self::setLdapParams($addressbookid)) {
|
||||||
foreach ($a_ids as $id) {
|
foreach ($a_ids as $id) {
|
||||||
$cid = str_replace(".vcf", "", $id);
|
$cid = str_replace(".vcf", "", $id);
|
||||||
@ -616,7 +611,6 @@ class Ldap extends AbstractBackend {
|
|||||||
$generated = "nocn-".rand(0, 65535);
|
$generated = "nocn-".rand(0, 65535);
|
||||||
$contact->N = $generated;
|
$contact->N = $generated;
|
||||||
$contact->FN = $generated;
|
$contact->FN = $generated;
|
||||||
//error_log("Generated name: $generated");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$contact instanceof VCard) {
|
if(!$contact instanceof VCard) {
|
||||||
@ -627,7 +621,6 @@ class Ldap extends AbstractBackend {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//error_log("adding ".$contact->serialize());
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$contact->validate(VCard::REPAIR|VCard::UPGRADE);
|
$contact->validate(VCard::REPAIR|VCard::UPGRADE);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user