From 674a4572c5fde55e9b44b708f2d21c6af89bfc81 Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Thu, 23 Aug 2012 14:45:19 +0200 Subject: [PATCH] Used non-existing variable. --- lib/share/addressbook.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/share/addressbook.php b/lib/share/addressbook.php index 62799696..0c90470d 100644 --- a/lib/share/addressbook.php +++ b/lib/share/addressbook.php @@ -41,7 +41,7 @@ class OC_Share_Backend_Addressbook implements OCP\Share_Backend_Collection { public function generateTarget($itemSource, $shareWith, $exclude = null) { $addressbook = OC_Contacts_Addressbook::find( $itemSource ); $user_addressbooks = array(); - foreach(OC_Contacts_Addressbook::all($uid) as $user_addressbook) { + foreach(OC_Contacts_Addressbook::all($shareWith) as $user_addressbook) { $user_addressbooks[] = $user_addressbook['displayname']; } $name = $addressbook['userid']."'s ".$addressbook['displayname']; @@ -49,7 +49,7 @@ class OC_Share_Backend_Addressbook implements OCP\Share_Backend_Collection { while (in_array($name.$suffix, $user_addressbooks)) { $suffix++; } - + return $name.$suffix; }