from pr/34013 :

"From imp, add a sender address in the addressbook => you get an error message,
 and no address is added."
This commit is contained in:
Ying-Chieh Liao 2002-01-19 17:03:33 +00:00
parent 1e5f8701d9
commit 95d1e64162
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=53348
3 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,11 @@
--- lib/api.php.orig Tue Dec 25 20:01:35 2001
+++ lib/api.php Thu Jan 17 23:46:58 2002
@@ -90,7 +90,7 @@
$driver = Turba_Source::factory($addressbook, $cfgSources[$addressbook]);
$res = $driver->search(array('name' => $name, 'email' => $address), LASTNAME, TURBA_SEARCH_AND);
- if (PEAR::isError($res) || count($res) > 0) {
+ if (PEAR::isError($res) || count($res->objects) > 0) {
return PEAR::raiseError(_("This person is already in your addressbook."), HORDE_MESSAGE);
}

View File

@ -0,0 +1,11 @@
--- lib/api.php.orig Tue Dec 25 20:01:35 2001
+++ lib/api.php Thu Jan 17 23:46:58 2002
@@ -90,7 +90,7 @@
$driver = Turba_Source::factory($addressbook, $cfgSources[$addressbook]);
$res = $driver->search(array('name' => $name, 'email' => $address), LASTNAME, TURBA_SEARCH_AND);
- if (PEAR::isError($res) || count($res) > 0) {
+ if (PEAR::isError($res) || count($res->objects) > 0) {
return PEAR::raiseError(_("This person is already in your addressbook."), HORDE_MESSAGE);
}

View File

@ -0,0 +1,11 @@
--- lib/api.php.orig Tue Dec 25 20:01:35 2001
+++ lib/api.php Thu Jan 17 23:46:58 2002
@@ -90,7 +90,7 @@
$driver = Turba_Source::factory($addressbook, $cfgSources[$addressbook]);
$res = $driver->search(array('name' => $name, 'email' => $address), LASTNAME, TURBA_SEARCH_AND);
- if (PEAR::isError($res) || count($res) > 0) {
+ if (PEAR::isError($res) || count($res->objects) > 0) {
return PEAR::raiseError(_("This person is already in your addressbook."), HORDE_MESSAGE);
}