Update of /cvsroot/phplib/php-lib/php
In directory usw-pr-cvs1:/tmp/cvs-serv6050
Modified Files:
local.inc local4.inc
Log Message:
Sync the various local.inc files, and a few bug fixes
Index: local.inc
===================================================================
RCS file: /cvsroot/phplib/php-lib/php/local.inc,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** local.inc 2000/04/03 10:39:57 1.33
--- local.inc 2001/08/21 12:56:02 1.34
***************
*** 90,93 ****
--- 90,94 ----
class Example_Auth extends Auth_Sql {
var $classname = "Example_Auth";
+
var $lifetime = 15;
var $mode = "reg"; ## can do "log" as well.
***************
*** 99,102 ****
--- 100,109 ----
}
+ class Example_Default_Auth extends Example_Auth {
+ var $classname = "Example_Default_Auth";
+
+ var $nobody = true;
+ }
+
# A variation of Example_Auth which uses a Challenge-Response
# Authentication. The password never crosses the net in clear,
***************
*** 108,112 ****
var $classname = "Example_Challenge_Auth";
! var $lifetime = 15;
var $magic = "Simsalabim"; ## Challenge seed
--- 115,119 ----
var $classname = "Example_Challenge_Auth";
! var $lifetime = 15;
var $magic = "Simsalabim"; ## Challenge seed
***************
*** 178,182 ****
## doChallengeResponse()
! class Example_Challenge_Crypt_Auth extends Auth {
var $classname = "Example_Challenge_Crypt_Auth";
--- 185,189 ----
## doChallengeResponse()
! class Example_Challenge_Crypt_Auth extends Auth_Sql {
var $classname = "Example_Challenge_Crypt_Auth";
***************
*** 203,207 ****
}
-
function auth_validatelogin() {
global $username, $password, $mode;
--- 210,213 ----
***************
*** 229,233 ****
while($this->db->next_record()) {
$pwenc = $this->db->f("p_pwenc");
! $p = $this->db->f("p_password");
$salt = ($pwenc == "crypt")?substr($p, 0, 2):"";
--- 235,239 ----
while($this->db->next_record()) {
$pwenc = $this->db->f("p_pwenc");
! $p = $this->db->f("p_password");
$salt = ($pwenc == "crypt")?substr($p, 0, 2):"";
***************
*** 248,252 ****
return $uid;
}
-
}
--- 254,257 ----
***************
*** 276,282 ****
##
## Example_Menu may extend Menu or Menu_Button
! ## If you name this class differently, you must also
! ## rename its constructor function - this is a PHP3 language
! ## design stupidity.
##
## To use this, you must enable the require statement for
--- 281,289 ----
##
## Example_Menu may extend Menu or Menu_Button
! ## Remember that in PHP 3 a class's constructor function must have the
! ## same name as the class. To make it easier to extend this class we
! ## have a real constructor function called setup(). When you create an
! ## extension of this class, create your constructor function which only
! ## needs to call setup().
##
## To use this, you must enable the require statement for
***************
*** 314,318 ****
# "/2" => array("title" => "Text 2"),
# "/2/1" => array("title" => "Text 2.1"),
! # "/2/2" => array("title" => "Text 2.2"),
# "/2/2/1"=> array("title" => "Text 2.2.1"),
# "/2/2/2"=> array("title" => "Text 2.2.2"),
--- 321,325 ----
# "/2" => array("title" => "Text 2"),
# "/2/1" => array("title" => "Text 2.1"),
! # "/2/2" => array("title" => "Text 2.2", "pseudo" => true),
# "/2/2/1"=> array("title" => "Text 2.2.1"),
# "/2/2/2"=> array("title" => "Text 2.2.2"),
***************
*** 320,324 ****
# "/2/4" => array("title" => "Text 2.4")
# );
! #
# function Example_Menu() {
# $this->setup();
--- 327,331 ----
# "/2/4" => array("title" => "Text 2.4")
# );
! #
# function Example_Menu() {
# $this->setup();
Index: local4.inc
===================================================================
RCS file: /cvsroot/phplib/php-lib/php/local4.inc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** local4.inc 2001/05/30 13:16:49 1.1
--- local4.inc 2001/08/21 12:56:02 1.2
***************
*** 68,75 ****
#}
class Example_Session_Custom extends Session_Custom {
var $classname = "Example_Session_Custom";
! var $mode = "user"
var $cookiename = ""; ## defaults to classname
var $lifetime = 0; ## 0 = do session cookies, else minutes
--- 68,82 ----
#}
+ class Example_Session extends Session {
+ var $classname = "Example_Session";
+
+ var $cookiename = ""; ## defaults to classname
+ var $allowcache = "nocache"; ## "public", "private", or "nocache"
+ }
+
class Example_Session_Custom extends Session_Custom {
var $classname = "Example_Session_Custom";
! var $mode = "user";
var $cookiename = ""; ## defaults to classname
var $lifetime = 0; ## 0 = do session cookies, else minutes
***************
*** 79,89 ****
}
- class Example_Session extends Session {
- var $classname = "Example_Session";
-
- var $cookiename = ""; ## defaults to classname
- var $allowcache = "nocache";
- }
-
class Example_User extends User {
var $classname = "Example_User";
--- 86,89 ----
***************
*** 94,97 ****
--- 94,98 ----
class Example_Auth extends Auth_Sql {
var $classname = "Example_Auth";
+
var $lifetime = 15;
var $mode = "reg"; ## can do "log" as well.
***************
*** 103,106 ****
--- 104,113 ----
}
+ class Example_Default_Auth extends Example_Auth {
+ var $classname = "Example_Default_Auth";
+
+ var $nobody = true;
+ }
+
# A variation of Example_Auth which uses a Challenge-Response
# Authentication. The password never crosses the net in clear,
***************
*** 182,186 ****
## doChallengeResponse()
! class Example_Challenge_Crypt_Auth extends Auth {
var $classname = "Example_Challenge_Crypt_Auth";
--- 189,193 ----
## doChallengeResponse()
! class Example_Challenge_Crypt_Auth extends Auth_Sql {
var $classname = "Example_Challenge_Crypt_Auth";
***************
*** 207,211 ****
}
-
function auth_validatelogin() {
global $username, $password, $mode;
--- 214,217 ----
***************
*** 233,237 ****
while($this->db->next_record()) {
$pwenc = $this->db->f("p_pwenc");
! $p = $this->db->f("p_password");
$salt = ($pwenc == "crypt")?substr($p, 0, 2):"";
--- 239,243 ----
while($this->db->next_record()) {
$pwenc = $this->db->f("p_pwenc");
! $p = $this->db->f("p_password");
$salt = ($pwenc == "crypt")?substr($p, 0, 2):"";
***************
*** 252,256 ****
return $uid;
}
-
}
--- 258,261 ----
***************
*** 280,286 ****
##
## Example_Menu may extend Menu or Menu_Button
! ## If you name this class differently, you must also
! ## rename its constructor function - this is a PHP3 language
! ## design stupidity.
##
## To use this, you must enable the require statement for
--- 285,293 ----
##
## Example_Menu may extend Menu or Menu_Button
! ## Remember that in PHP 3 a class's constructor function must have the
! ## same name as the class. To make it easier to extend this class we
! ## have a real constructor function called setup(). When you create an
! ## extension of this class, create your constructor function which only
! ## needs to call setup().
##
## To use this, you must enable the require statement for
***************
*** 318,322 ****
# "/2" => array("title" => "Text 2"),
# "/2/1" => array("title" => "Text 2.1"),
! # "/2/2" => array("title" => "Text 2.2"),
# "/2/2/1"=> array("title" => "Text 2.2.1"),
# "/2/2/2"=> array("title" => "Text 2.2.2"),
--- 325,329 ----
# "/2" => array("title" => "Text 2"),
# "/2/1" => array("title" => "Text 2.1"),
! # "/2/2" => array("title" => "Text 2.2", "pseudo" => true),
# "/2/2/1"=> array("title" => "Text 2.2.1"),
# "/2/2/2"=> array("title" => "Text 2.2.2"),
***************
*** 324,328 ****
# "/2/4" => array("title" => "Text 2.4")
# );
! #
# function Example_Menu() {
# $this->setup();
--- 331,335 ----
# "/2/4" => array("title" => "Text 2.4")
# );
! #
# function Example_Menu() {
# $this->setup();
|