- Fixed spamcop web based reporting form (#1519673) and removed service
type options from spamcop plugin.
- Removed trailing ?> from function scripts.
+ - Added checks for non-existent backend to AddressBook class.
Version 1.5.1 (branched on 2006-02-12)
--------------------------------------
$ret = FALSE;
}
- } else {
+ } elseif (! isset($this->backends[$bnum])) {
+ /* make sure that backend exists */
+ $this->error = _("Unknown address book backend");
+ $ret = false;
+ } else {
/* Search only one backend */
$ret = array();
if ($bnum > -1) {
+ if (!isset($this->backends[$bnum])) {
+ $this->error = _("Unknown address book backend");
+ return false;
+ }
$res = $this->backends[$bnum]->lookup($alias);
if (is_array($res)) {
return $res;
if ($bnum == -1) {
$sel = $this->get_backend_list('');
+ } elseif (! isset($this->backends[$bnum])) {
+ /* make sure that backend exists */
+ $this->error = _("Unknown address book backend");
+ $ret = false;
} else {
$sel = array(0 => &$this->backends[$bnum]);
}
return false;
}
+ /* make sure that backend exists */
+ if (! isset($this->backends[$bnum])) {
+ $this->error = _("Unknown address book backend");
+ return false;
+ }
+
/* Check that specified backend accept new entries */
if (!$this->backends[$bnum]->writeable) {
$this->error = _("Address book is read-only");
$alias = array(0 => $alias);
}
+ /* make sure that backend exists */
+ if (! isset($this->backends[$bnum])) {
+ $this->error = _("Unknown address book backend");
+ return false;
+ }
+
/* Check that specified backend is writable */
if (!$this->backends[$bnum]->writeable) {
$this->error = _("Address book is read-only");
$userdata['nickname'] = $userdata['email'];
}
+ /* make sure that backend exists */
+ if (! isset($this->backends[$bnum])) {
+ $this->error = _("Unknown address book backend");
+ return false;
+ }
+
/* Check that specified backend is writable */
if (!$this->backends[$bnum]->writeable) {
$this->error = _("Address book is read-only");;