[AppDB] - user class cleanup and implement user class unit test
Jonathan Ernst
jonathan at ernstfamily.ch
Mon Jun 26 17:06:40 CDT 2006
Le lundi 26 juin 2006 à 15:33 -0400, Chris Morgan a écrit :
[...]
> Comments? Questions?
>
Index: index.php
===================================================================
RCS file: /opt/cvs-commit/appdb/index.php,v
retrieving revision 1.33
diff -u -r1.33 index.php
--- index.php 21 Jun 2006 01:04:12 -0000 1.33
+++ index.php 26 Jun 2006 19:26:39 -0000
@@ -7,7 +7,7 @@
* application environment
*/
include("path.php");
-require(BASE."include/incl.php");
+require_once(BASE."include/incl.php");
Why use require_once ? It is slower and is bad unless you intend to
include index.php in another file where incl.php is also included...
Index: include/image.php
===================================================================
RCS file: /opt/cvs-commit/appdb/include/image.php,v
retrieving revision 1.5
diff -u -r1.5 image.php
--- include/image.php 21 Sep 2005 14:16:40 -0000 1.5
+++ include/image.php 26 Jun 2006 19:26:40 -0000
@@ -3,6 +3,8 @@
/* image and image_resource classes */
/*************************************/
+include_once(BASE."include/incl.php");
+
This time you use include once, we should use require everywhere if
incl.php is required (and including a file in another include is not so
pretty IMHO).
+ /* NOTE: we can't update the users password like we can update
other */
+ /* fields such as their email or username because the password is
hashed */
+ /* in the database so we can't keep the users password in a class
member variable */
+ /* and use update() because we can't check if the password changed
without hashing */
+ /* the newly supplied one */
+ function update_password($sPassword)
Should updatePassword according to our coding standards (method names).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: Ceci est une partie de message
=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060627/a4ed4907/attachment.pgp
More information about the wine-patches
mailing list