6.0.0-beta1
7/11/25

[#3588] can't add entries when only one source is editable
Summary can't add entries when only one source is editable
Queue Turba
Queue Version 2.1
Type Bug
State Resolved
Priority 1. Low
Owners Horde Developers (at)
Requester matthew.dunham (at) ic (dot) ucsb (dot) edu
Created 03/09/2006 (7064 days ago)
Due
Updated 03/10/2006 (7063 days ago)
Assigned 03/10/2006 (7063 days ago)
Resolved 03/10/2006 (7063 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
03/10/2006 11:49:48 PM Chuck Hagenbuch Comment #3
State ⇒ Resolved
Reply to this comment
http://lists.horde.org/archives/cvs/Week-of-Mon-20060306/055704.html 
should take care of this for HEAD, and I'll merge it to FW_3 for Turba 
2.1.1 shortly.
03/10/2006 11:36:51 PM Chuck Hagenbuch Comment #2
Assigned to Horde DevelopersHorde Developers
State ⇒ Assigned
Reply to this comment
Sure it agrees with the comment - it says, hide if there's only one 
(editable) share. I see where it falls down, though, if you're 
browsing a readonly source and there's one writable source. If you 
only have one source, and it's writable, your patch would show the 
"copy to" dropdown - which doesn't make sense.
03/09/2006 01:55:45 AM matthew (dot) dunham (at) ic (dot) ucsb (dot) edu Comment #1
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ can't add entries when only one source is editable
Queue ⇒ Turba
Reply to this comment
in lib/base.php, the following code has a small bug:



     // Hide the list of addressbooks if there is only one available.

     $add_source_options = '';

     $addSources = Turba::getAddressBooks(PERMS_EDIT);

     if (count($addSources) > 1) {



this conditional expression is true only if you have at least 2 
editable sources, which neither agrees with the comment nor the logic. 
e.g. in the case where you want to, say, copy an entry from an 
readonly source to a readwrite source, this condition fails.



         if (count($addSources) > 0) {



is the appropriate fix.


Saved Queries