delete many addresses at once
This commit is contained in:
parent
4f9542a833
commit
e497adeae3
|
@ -293,18 +293,20 @@ class abook_carddav extends addressbook_backend {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete address
|
* Delete addresses
|
||||||
* @param alias
|
* @param aliases array of nicknames to delete
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
function remove($alias) {
|
function remove($aliases) {
|
||||||
if (!$this->writeable) {
|
if (!$this->writeable) {
|
||||||
return $this->set_error(_("Addressbook is read-only"));
|
return $this->set_error(_("Addressbook is read-only"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: edit this if we use different nick-naming scheme
|
foreach($aliases as $alias) {
|
||||||
$uri = $this->abook->getUriPath() . $alias;
|
// TODO: edit this if we use different nick-naming scheme
|
||||||
$this->abook->deleteCard($uri);
|
$uri = $this->abook->getUriPath() . $alias;
|
||||||
|
$this->abook->deleteCard($uri);
|
||||||
|
}
|
||||||
|
|
||||||
// FIXME:
|
// FIXME:
|
||||||
// return true if operation is succesful.
|
// return true if operation is succesful.
|
||||||
|
|
Loading…
Reference in a new issue