[imp] PATCH: IMP_ACL_rfc2086 - things I learnt yesterday!

Jan Schneider jan at horde.org
Wed Feb 5 12:37:19 PST 2003


Zitat von Chris Hastie <lists at oak-wood.co.uk>:

> Attached is a patch to imp/lib/ACL/rfc2086.php that deals with various
> issues that came up yesterday, along with a small patch to imp/acl.php.

The patch to acl.php isn't necessary, as a variable that's equal to
'no_support' is _always_ a string.
 
> *   Warnings include more detailed information about what the problem
>     was. Hopefully this will make further debugging easier.

Great, but please replace double with single quotes where possible (see
Eric's addition to CODING_STANDARDS).
 
> *   canEdit() always returns true as we can't actually establish if a
>     user is able to edit an ACL or not since we know nothing about which
>     groups s/he's in. Leave the decision to the server. The patch to
>     imp/acl.php corrects handling of the server's response.
> 
> *   better handling of passwords containing linear white space, '"',
>     ''', or '/'  when using plaintext logins.
> 
> *   correct bug introduced by the last cvs update which always claims
>     the server doesn't support ACL (patch from Didi Rieder)

I already committed his fix. If you didn't yet subscribe to the cvs mailing
list you should as soon as possible.
 
> I had prepared a patch with a little bit more attention to
> docs/CODING_STANDARDS but hadn't noticed that Chuck had already cleaned
> the code up. This is a steep learning curve for me, but I am trying,
> honest ("yes, very trying indeed" you cry:) ) so please bear with me. I
> have a couple of questions on this:
> 
> 1   Line length. If I wrap lines, as I have with the warnings in this
>     patch, should I indent the wrapped part (which is what I've gone
>     with) or line it up with first section?

Indenting the wrapped line is the way to go.
 
> 2   Why is it preferable to get the values of variables in a class by
>     calling functions that return them rather than simply looking at the
>     variable? Is it a question of preferred style or is there some
>     intrinsic problem with just looking at variables?

Because this is OOP. At least what PHP allows of it.

Jan.

--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft


More information about the imp mailing list