[Phplib-commit] CVS: php-lib/php local.inc,1.37,1.38 local4.inc,1.3,1.4
Brought to you by:
nhruby,
richardarcher
From: Richard A. <ric...@us...> - 2002-02-26 08:13:27
|
Update of /cvsroot/phplib/php-lib/php In directory usw-pr-cvs1:/tmp/cvs-serv8449 Modified Files: local.inc local4.inc Log Message: Fixed [ #513935 ] local.inc inconsistencies Index: local.inc =================================================================== RCS file: /cvsroot/phplib/php-lib/php/local.inc,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** local.inc 26 Feb 2002 07:52:52 -0000 1.37 --- local.inc 26 Feb 2002 08:13:25 -0000 1.38 *************** *** 173,177 **** if(isset($username)) { ! $this->auth["uname"]=$username; ## This provides access for "loginform.ihtml" } $this->db->query(sprintf("select p_user_id,p_perms,p_password ". --- 173,177 ---- if(isset($username)) { ! $this->auth["uname"]=$username; ## This provides access for "crloginform.ihtml" } $this->db->query(sprintf("select p_user_id,p_perms,p_password ". *************** *** 263,267 **** if(isset($username)) { ! $this->auth["uname"]=$username; ## This provides access for "loginform.ihtml" } --- 263,267 ---- if(isset($username)) { ! $this->auth["uname"]=$username; ## This provides access for "crcloginform.ihtml" } Index: local4.inc =================================================================== RCS file: /cvsroot/phplib/php-lib/php/local4.inc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** local4.inc 1 Sep 2001 07:09:42 -0000 1.3 --- local4.inc 26 Feb 2002 08:13:25 -0000 1.4 *************** *** 29,33 **** class Example_CT_Sql extends CT_Sql { var $database_class = "DB_Example"; ## Which database to connect... ! var $database_table = "active_sessions"; ## and find our session data in this table. } --- 29,33 ---- class Example_CT_Sql extends CT_Sql { var $database_class = "DB_Example"; ## Which database to connect... ! var $database_table = "active_sessions"; ## and find our session data in this table. } *************** *** 70,74 **** ## This class stores session data in cookies. You will also need to extend ## the Session class so that the only acceptable $mode is "cookie". ! ## A demo of this class is in pages/ct_cookie.php3 class Example_CT_Cookie extends CT_Cookie { var $lifetime = 40; --- 70,77 ---- ## This class stores session data in cookies. You will also need to extend ## the Session class so that the only acceptable $mode is "cookie". ! ## A demo of this class is in pages/ct_cookie.php3. ! ## Because cookies are *required* for this storage method, it is not ! ## recommended for production systems. If a user refuses cookies, this ! ## storage method will not work at all. class Example_CT_Cookie extends CT_Cookie { var $lifetime = 40; *************** *** 113,116 **** --- 116,120 ---- var $classname = "Example_User"; + var $magic = "Abracadabra"; ## ID seed var $that_class = "Example_CT_Sql"; ## name of data storage container class } *************** *** 153,157 **** var $classname = "Example_Challenge_Auth"; ! var $lifetime = 15; var $magic = "Simsalabim"; ## Challenge seed --- 157,161 ---- var $classname = "Example_Challenge_Auth"; ! var $lifetime = 15; var $magic = "Simsalabim"; ## Challenge seed *************** *** 174,178 **** if(isset($username)) { ! $this->auth["uname"]=$username; ## This provides access for "loginform.ihtml" } $this->db->query(sprintf("select p_user_id,p_perms,p_password ". --- 178,182 ---- if(isset($username)) { ! $this->auth["uname"]=$username; ## This provides access for "crloginform.ihtml" } $this->db->query(sprintf("select p_user_id,p_perms,p_password ". *************** *** 181,184 **** --- 185,192 ---- addslashes($username))); + if ($this->db->num_rows() == 0) { + return false; + } + while($this->db->next_record()) { $uid = $this->db->f("p_user_id"); *************** *** 260,264 **** if(isset($username)) { ! $this->auth["uname"]=$username; ## This provides access for "loginform.ihtml" } --- 268,272 ---- if(isset($username)) { ! $this->auth["uname"]=$username; ## This provides access for "crcloginform.ihtml" } *************** *** 270,273 **** --- 278,285 ---- $this->database_table, addslashes($username))); + + if ($this->db->num_rows() == 0) { + return false; + } while($this->db->next_record()) { |