Re: Update (was: File_Apache)
| From: | Mika Tuupola | Date: | Sun, 14 Sep 2003 10:00:27 +0000 |
| Subject: | Re: Update (was: File_Apache) | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-21487@lists.php.net to get a copy of this message | ||
On Sat, 13 Sep 2003, Michael Wallner wrote:
> *File_HtAccess*
> I've adapted the commonly used methods load() and save() and
> Alan's suggestions, too. I've also implemented Apache's
> ErrorDocuments direktive (*huh* :) and Digest Authentication.
> However I will wait for Mika's review.
Just a quick note. The idea of course is to merge
extra features into current File_HtAccess, not to
completely replace the old one.
> *File_HtPasswd*
> Even though I've completeley refactored this class, it still
> depends on Apache's htpasswd binary, but no temp directory.
> Also adapted load() and save().
I still don't understand why there is need for another
password handling class for the same password file format.
Why not just improve current File_Passwd to support the missing
features and windows platform (even by using htpasswd binary
when needed). The current class needs some facelifting anyway.
> *File_HtGroup*
> As it was, just adapted load() and save() :)
This looks fines. Although I'd change the name to singular
File_HtGroup. Now it is plural File_HtGroups. Singular names
are usually preferred. The default parameter for constructor
could be $file='.htgroup' instead of empty default. Also the
example you have second parameter:
$htg = &new File_HtGroups('/www/mike/auth/.htgroups', true);
but the second parameter does not exist in the constructor
function.
Also in the example there is:
$htg->addGroup('user');
$htg->addUser('user', 'mike');
but the function itself is
function addUser($user, $group)
so i guess the paramaters got switched in the example :)
+1 with the name File_HtGroup
> *File_HtDigest*
> This one is new and handles Apache'S MD5-digest password files.
At a quick glance looks ok too.
--
Mika Tuupola http://www.appelsiini.net/~tuupola/