Date: 05/30/01
- Next message: uw: "[phplib-dev] cvs commit"
- Previous message: max: "[phplib-dev] cvs commit"
- Next in thread: uw: "[phplib-dev] cvs commit"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: max
Date: Wed May 30 16:33:44 2001
Modified files:
php-lib/php/user4.inc
Log message:
Some sanity checks in register(), is_registered() and unregister()
Index: php-lib/php/user4.inc
diff -u php-lib/php/user4.inc:1.4 php-lib/php/user4.inc:1.5
--- php-lib/php/user4.inc:1.4 Wed May 30 15:16:49 2001
+++ php-lib/php/user4.inc Wed May 30 16:33:13 2001
@@ -4,7 +4,7 @@
*
* <email protected> 1998,1999 NetUSE GmbH Boris Erdmann, Kristian Koehntopp
* 2001, Maxim Derkachev <kot <email protected>>
-* <email protected> $Id: user4.inc,v 1.4 2001/05/30 13:16:49 uw Exp $
+* <email protected> $Id: user4.inc,v 1.5 2001/05/30 14:33:13 max Exp $
* <email protected> PHPLib
* <email protected> public
*/
@@ -90,10 +90,9 @@
*/
function register ($things) {
- $things = explode (",", $things);
+ $things = preg_split('/\s*,\s*/', trim($var_names) );
foreach ($things as $thing) {
- $thing = trim($thing);
if (!isset($GLOBALS[$thing]))
continue;
@@ -120,10 +119,9 @@
*/
function unregister($things) {
- $things = explode (",", $things);
+ $things = preg_split('/\s*,\s*/', trim($var_names) );
foreach ($things as $thing) {
- $thing = trim($thing);
if (!isset ($GLOBALS[$this->vars_array][$thing]))
continue;
@@ -190,4 +188,4 @@
} // end class User
-?>
\ No newline at end of file
+?>
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-dev-unsubscribe <email protected>
For additional commands, e-mail: phplib-dev-help <email protected>
- Next message: uw: "[phplib-dev] cvs commit"
- Previous message: max: "[phplib-dev] cvs commit"
- Next in thread: uw: "[phplib-dev] cvs commit"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

