[dev] [cvs] commit: turba/lib Turba.php
Michael Rubinsky
mike at theupstairsroom.com
Mon Jul 23 21:42:34 UTC 2007
Quoting Chuck Hagenbuch <chuck at horde.org>:
> Take a look at my last commit - the defaults entry for each source was
> being checked for _every_ share, so once a default share was found, if
> a later share was *not* the default share, the $defaults entry would
> go back to false.
Not to pick hairs here, just trying to understand what assumption I
was making that was not correct: shouldn't the conditional expression
on line 409 of the 'before' Turba.php
(http://cvs.horde.org/co.php?r=1.143&f=turba%2Flib%2FTurba.php) have
caught if an entry in $defaults was already true, thus preventing it
from being overwritten? Granted, it was not as efficient, but I think
I'm missing how this would have led to multiple shares for the same
address book. I was assuming that the problem was due to the fact
that the datatree data was not converted as needed (since I didn't
commit the appropriate changes to the flatten script). I saw no
errors (yes, I always use E_ALL) since on my datatree, the data was
converted. I did, however, see additional shares being created if a
user logged in after the code was updated, but before any upgrade
script was run. Just want to make sure I understand where my
thinking/coding is flawed :)
> I think between fixing that, and setting the missing 'name' parameter,
> things should be mostly better now (I was getting a lot of extra
> default shares for all of my users).
>
> I think it might be a good idea, though, to mimic the logic we have in
> the other groupware apps, where we only create a default share if the
> user doesn't have any other address books (or perhaps, any others in a
> specific backend, for Turba's case).
OK. Just so I understand: If a user has any address book visible for a
specific backend, don't create a default share. This means that, for
example, if I have a 'Global' share visible to all authenticated
users, and a new user logs in for the first time, he will *only* have
the Global address book. He would have to create a private address
book for himself if he wants one. On the other hand, if no other
address books are visible, then we should create the personal address
book for him?
Thanks,
mike
--
The Horde Project (www.horde.org)
mrubinsk at horde.org
"Time just hates me. That's why it made me an adult." - Josh Joplin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-keys
Size: 2013 bytes
Desc: PGP Public Key
Url : http://lists.horde.org/archives/dev/attachments/20070723/b2f92344/attachment.bin
More information about the dev
mailing list