phplib-commit Mailing List for PHPLIB
Brought to you by:
nhruby,
richardarcher
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(76) |
Sep
(7) |
Oct
(2) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(7) |
Feb
(7) |
Mar
(14) |
Apr
(27) |
May
(2) |
Jun
(2) |
Jul
(5) |
Aug
(6) |
Sep
(1) |
Oct
(9) |
Nov
(4) |
Dec
|
2003 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
|
Feb
(7) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
(1) |
Apr
(3) |
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
(6) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Florian C. <ch...@us...> - 2007-04-14 22:49:42
|
Update of /cvsroot/phplib/php-lib-stable/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19732 Modified Files: session4.inc Log Message: in freeze function: save global variable into $_SESSION only if the global variable is set. Useful when you set a variable directly in $_SESSION on your page (maybe with 3rd party librairies like saja), and not using $sess->register(), because when you call page_close(), the $_SESSION variable you did set is overwritten with an empty value. Index: session4.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/session4.inc,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** session4.inc 12 Jan 2007 21:47:27 -0000 1.6 --- session4.inc 14 Apr 2007 22:49:27 -0000 1.7 *************** *** 558,562 **** // foreach ($_SESSION as $key => $value) { global $$key; ! eval("\$_SESSION[\$key]= \$$key;"); } } --- 558,564 ---- // foreach ($_SESSION as $key => $value) { global $$key; ! ! if(isset($$key)) ! eval("\$_SESSION[\$key]= \$$key;"); } } |
From: Layne W. <lay...@us...> - 2007-01-12 21:47:32
|
Update of /cvsroot/phplib/php-lib-stable/pages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4474/pages Modified Files: defauth.php3 Log Message: prefer auto-globals (i.e. $_GET instead of $HTTP_GET_VARS) allow for "register_long_arrays" INI setting in PHP5 to be turned off as this disables the longer arrays Index: defauth.php3 =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/pages/defauth.php3,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** defauth.php3 19 Mar 2002 22:32:25 -0000 1.3 --- defauth.php3 12 Jan 2007 21:47:27 -0000 1.4 *************** *** 25,31 **** // after the user submits a username and password, we will unauth // them before they even get logged in! ! $HTTP_SERVER_VARS["QUERY_STRING"] = ereg_replace( "(^|&)again=yes(&|$)", ! "\\1", $HTTP_SERVER_VARS["QUERY_STRING"]); $auth->login_if($again); // relogin, if this was requested... --- 25,34 ---- // after the user submits a username and password, we will unauth // them before they even get logged in! ! if (!isset($_SERVER)) { ! $_SERVER = $HTTP_SERVER_VARS; ! } ! $_SERVER["QUERY_STRING"] = ereg_replace( "(^|&)again=yes(&|$)", ! "\\1", $_SERVER["QUERY_STRING"]); $auth->login_if($again); // relogin, if this was requested... |
From: Layne W. <lay...@us...> - 2007-01-12 21:47:32
|
Update of /cvsroot/phplib/php-lib-stable/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4474/php Modified Files: auth.inc auth4.inc crcloginform.ihtml crloginform.ihtml layout_html.inc local.inc local4.inc loginform.ihtml menu.inc oohforms.inc session.inc session4.inc setup.inc tpl_form.inc Log Message: prefer auto-globals (i.e. $_GET instead of $HTTP_GET_VARS) allow for "register_long_arrays" INI setting in PHP5 to be turned off as this disables the longer arrays Index: auth.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/auth.inc,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** auth.inc 25 Apr 2002 02:19:31 -0000 1.7 --- auth.inc 12 Jan 2007 21:47:27 -0000 1.8 *************** *** 45,49 **** ## function start() { ! global $sess, $HTTP_POST_VARS, $HTTP_GET_VARS; ## This is for performance, I guess but I'm not sure if it could --- 45,54 ---- ## function start() { ! global $sess; ! if (!isset($_POST)) { ! global $HTTP_POST_VARS, $HTTP_GET_VARS; ! $_POST = $HTTP_POST_VARS; ! $_GET = $HTTP_GET_VARS; ! } ## This is for performance, I guess but I'm not sure if it could *************** *** 68,73 **** case "form": # Login in progress ! if ((isset($HTTP_POST_VARS[$this->cancel_login]) && $HTTP_POST_VARS[$this->cancel_login]) or ! (isset($HTTP_GET_VARS[$this->cancel_login]) && $HTTP_GET_VARS[$this->cancel_login])) { # If $this->cancel_login is set, delete all auth info and set # state to "Not logged in", so eventually default or automatic --- 73,78 ---- case "form": # Login in progress ! if ((isset($_POST[$this->cancel_login]) && $_POST[$this->cancel_login]) or ! (isset($_GET[$this->cancel_login]) && $_GET[$this->cancel_login])) { # If $this->cancel_login is set, delete all auth info and set # state to "Not logged in", so eventually default or automatic Index: auth4.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/auth4.inc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** auth4.inc 29 Jul 2006 10:45:56 -0000 1.2 --- auth4.inc 12 Jan 2007 21:47:27 -0000 1.3 *************** *** 61,65 **** ## function start() { ! global $sess, $HTTP_POST_VARS, $HTTP_GET_VARS; ## This is for performance, I guess but I'm not sure if it could --- 61,70 ---- ## function start() { ! global $sess; ! if (!isset($_POST)) { ! global $HTTP_POST_VARS, $HTTP_GET_VARS; ! $_POST = $HTTP_POST_VARS; ! $_GET = $HTTP_GET_VARS; ! } ## This is for performance, I guess but I'm not sure if it could *************** *** 84,89 **** case "form": # Login in progress ! if ((isset($HTTP_POST_VARS[$this->cancel_login]) && $HTTP_POST_VARS[$this->cancel_login]) or ! (isset($HTTP_GET_VARS[$this->cancel_login]) && $HTTP_GET_VARS[$this->cancel_login])) { # If $this->cancel_login is set, delete all auth info and set # state to "Not logged in", so eventually default or automatic --- 89,94 ---- case "form": # Login in progress ! if ((isset($_POST[$this->cancel_login]) && $_POST[$this->cancel_login]) or ! (isset($_GET[$this->cancel_login]) && $_GET[$this->cancel_login])) { # If $this->cancel_login is set, delete all auth info and set # state to "Not logged in", so eventually default or automatic Index: crcloginform.ihtml =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/crcloginform.ihtml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** crcloginform.ihtml 2 Apr 2002 23:23:12 -0000 1.4 --- crcloginform.ihtml 12 Jan 2007 21:47:27 -0000 1.5 *************** *** 76,81 **** <?php ! global $HTTP_POST_VARS; ! if ( isset($HTTP_POST_VARS["username"]) ) { ?> <!-- failed login code --> --- 76,84 ---- <?php ! if (!isset($_POST)) { ! global $HTTP_POST_VARS; ! $_POST = $HTTP_POST_VARS; ! } ! if ( isset($_POST["username"]) ) { ?> <!-- failed login code --> Index: crloginform.ihtml =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/crloginform.ihtml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** crloginform.ihtml 2 Apr 2002 23:23:12 -0000 1.4 --- crloginform.ihtml 12 Jan 2007 21:47:27 -0000 1.5 *************** *** 74,79 **** <?php ! global $HTTP_POST_VARS; ! if ( isset($HTTP_POST_VARS["username"]) ) { ?> <!-- failed login code --> --- 74,82 ---- <?php ! if (!isset($_POST)) { ! global $HTTP_POST_VARS; ! $_POST = $HTTP_POST_VARS; ! } ! if ( isset($_POST["username"]) ) { ?> <!-- failed login code --> Index: layout_html.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/layout_html.inc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** layout_html.inc 7 Aug 2002 19:31:33 -0000 1.4 --- layout_html.inc 12 Jan 2007 21:47:27 -0000 1.5 *************** *** 614,618 **** ## server (hm, this is difficult!) function doc_pic ($a,$showdetails=false,$force=false) { - GLOBAL $HTTP_SERVER_VARS; $SRC=$a[SRC]; $path=$a[path]; --- 614,617 ---- *************** *** 640,644 **** ## if unset, assume DOCUMENT_ROOT to be the path if (!$this->layoutpath) { ! $this->layoutpath = $HTTP_SERVER_VARS["DOCUMENT_ROOT"]; } $SRC= $this->layouturl . $SRC; --- 639,647 ---- ## if unset, assume DOCUMENT_ROOT to be the path if (!$this->layoutpath) { ! if (!isset($_SERVER)) { ! global $HTTP_SERVER_VARS; ! $_SERVER = $HTTP_SERVER_VARS; ! } ! $this->layoutpath = $_SERVER["DOCUMENT_ROOT"]; } $SRC= $this->layouturl . $SRC; Index: local.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/local.inc,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** local.inc 2 Apr 2002 23:23:12 -0000 1.9 --- local.inc 12 Jan 2007 21:47:27 -0000 1.10 *************** *** 104,111 **** function auth_validatelogin() { ! global $HTTP_POST_VARS; ! if(isset($HTTP_POST_VARS["username"])) { ! $this->auth["uname"] = $HTTP_POST_VARS["username"]; ## This provides access for "loginform.ihtml" } --- 104,114 ---- function auth_validatelogin() { ! if (!isset($_POST)) { ! global $HTTP_POST_VARS; ! $_POST = $HTTP_POST_VARS; ! } ! if(isset($_POST["username"])) { ! $this->auth["uname"] = $_POST["username"]; ## This provides access for "loginform.ihtml" } *************** *** 117,122 **** " and password = '%s'", $this->database_table, ! addslashes($HTTP_POST_VARS["username"]), ! addslashes($HTTP_POST_VARS["password"]))); while($this->db->next_record()) { --- 120,125 ---- " and password = '%s'", $this->database_table, ! addslashes($_POST["username"]), ! addslashes($_POST["password"]))); while($this->db->next_record()) { *************** *** 161,173 **** function auth_validatelogin() { ! global $HTTP_POST_VARS, $challenge; ! if(isset($HTTP_POST_VARS["username"])) { ! $this->auth["uname"] = $HTTP_POST_VARS["username"]; ## This provides access for "loginform.ihtml" } $this->db->query(sprintf("select user_id, perms, password ". "from %s where username = '%s'", $this->database_table, ! addslashes($HTTP_POST_VARS["username"]))); if ($this->db->num_rows() == 0) { --- 164,180 ---- function auth_validatelogin() { ! global $challenge; ! if (!isset($_POST)) { ! global $HTTP_POST_VARS; ! $_POST = $HTTP_POST_VARS; ! } ! if(isset($_POST["username"])) { ! $this->auth["uname"] = $_POST["username"]; ## This provides access for "loginform.ihtml" } $this->db->query(sprintf("select user_id, perms, password ". "from %s where username = '%s'", $this->database_table, ! addslashes($_POST["username"]))); if ($this->db->num_rows() == 0) { *************** *** 180,188 **** $pass = $this->db->f("password"); } ! $expected_response = md5("$HTTP_POST_VARS[username]:$pass:$challenge"); ## True when JS is disabled ! if ($HTTP_POST_VARS["response"] == "") { ! if ($HTTP_POST_VARS["password"] != $pass) { return false; } else { --- 187,195 ---- $pass = $this->db->f("password"); } ! $expected_response = md5("$_POST[username]:$pass:$challenge"); ## True when JS is disabled ! if ($_POST["response"] == "") { ! if ($_POST["password"] != $pass) { return false; } else { *************** *** 193,197 **** ## Response is set, JS is enabled ! if ($expected_response != $HTTP_POST_VARS["response"]) { return false; } else { --- 200,204 ---- ## Response is set, JS is enabled ! if ($expected_response != $_POST["response"]) { return false; } else { *************** *** 232,243 **** function auth_validatelogin() { ! global $HTTP_POST_VARS, $challenge; ! $this->auth["uname"] = $HTTP_POST_VARS["username"]; ## This provides access for "loginform.ihtml" $this->db->query(sprintf("select user_id, perms, password ". "from %s where username = '%s'", $this->database_table, ! addslashes($HTTP_POST_VARS["username"]))); if ($this->db->num_rows() == 0) { --- 239,254 ---- function auth_validatelogin() { ! global $challenge; ! if (!isset($_POST)) { ! global $HTTP_POST_VARS; ! $_POST = $HTTP_POST_VARS; ! } ! $this->auth["uname"] = $_POST["username"]; ## This provides access for "loginform.ihtml" $this->db->query(sprintf("select user_id, perms, password ". "from %s where username = '%s'", $this->database_table, ! addslashes($_POST["username"]))); if ($this->db->num_rows() == 0) { *************** *** 250,258 **** $pass = $this->db->f("password"); ## Password is stored as a md5 hash } ! $expected_response = md5("$HTTP_POST_VARS[username]:$pass:$challenge"); ## True when JS is disabled ! if ($HTTP_POST_VARS["response"] == "") { ! if (md5($HTTP_POST_VARS["password"]) != $pass) { ## md5 hash for non-JavaScript browsers return false; } else { --- 261,269 ---- $pass = $this->db->f("password"); ## Password is stored as a md5 hash } ! $expected_response = md5("$_POST[username]:$pass:$challenge"); ## True when JS is disabled ! if ($_POST["response"] == "") { ! if (md5($_POST["password"]) != $pass) { ## md5 hash for non-JavaScript browsers return false; } else { *************** *** 263,267 **** ## Response is set, JS is enabled ! if ($expected_response != $HTTP_POST_VARS["response"]) { return false; } else { --- 274,278 ---- ## Response is set, JS is enabled ! if ($expected_response != $_POST["response"]) { return false; } else { Index: local4.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/local4.inc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** local4.inc 1 Oct 2002 16:22:03 -0000 1.1 --- local4.inc 12 Jan 2007 21:47:27 -0000 1.2 *************** *** 124,131 **** function auth_validatelogin() { ! global $HTTP_POST_VARS; ! if(isset($HTTP_POST_VARS["username"])) { ! $this->auth["uname"] = $HTTP_POST_VARS["username"]; ## This provides access for "loginform.ihtml" } --- 124,134 ---- function auth_validatelogin() { ! if (!isset($_POST)) { ! global $HTTP_POST_VARS; ! $_POST = $HTTP_POST_VARS; ! } ! if(isset($_POST["username"])) { ! $this->auth["uname"] = $_POST["username"]; ## This provides access for "loginform.ihtml" } *************** *** 137,142 **** " and password = '%s'", $this->database_table, ! addslashes($HTTP_POST_VARS["username"]), ! addslashes($HTTP_POST_VARS["password"]))); while($this->db->next_record()) { --- 140,145 ---- " and password = '%s'", $this->database_table, ! addslashes($_POST["username"]), ! addslashes($_POST["password"]))); while($this->db->next_record()) { *************** *** 181,193 **** function auth_validatelogin() { ! global $HTTP_POST_VARS, $challenge; ! if(isset($HTTP_POST_VARS["username"])) { ! $this->auth["uname"] = $HTTP_POST_VARS["username"]; ## This provides access for "loginform.ihtml" } $this->db->query(sprintf("select user_id, perms, password ". "from %s where username = '%s'", $this->database_table, ! addslashes($HTTP_POST_VARS["username"]))); if ($this->db->num_rows() == 0) { --- 184,200 ---- function auth_validatelogin() { ! global $challenge; ! if (!isset($_POST)) { ! global $HTTP_POST_VARS; ! $_POST = $HTTP_POST_VARS; ! } ! if(isset($_POST["username"])) { ! $this->auth["uname"] = $_POST["username"]; ## This provides access for "loginform.ihtml" } $this->db->query(sprintf("select user_id, perms, password ". "from %s where username = '%s'", $this->database_table, ! addslashes($_POST["username"]))); if ($this->db->num_rows() == 0) { *************** *** 200,208 **** $pass = $this->db->f("password"); } ! $expected_response = md5("$HTTP_POST_VARS[username]:$pass:$challenge"); ## True when JS is disabled ! if ($HTTP_POST_VARS["response"] == "") { ! if ($HTTP_POST_VARS["password"] != $pass) { return false; } else { --- 207,215 ---- $pass = $this->db->f("password"); } ! $expected_response = md5("$_POST[username]:$pass:$challenge"); ## True when JS is disabled ! if ($_POST["response"] == "") { ! if ($_POST["password"] != $pass) { return false; } else { *************** *** 213,217 **** ## Response is set, JS is enabled ! if ($expected_response != $HTTP_POST_VARS["response"]) { return false; } else { --- 220,224 ---- ## Response is set, JS is enabled ! if ($expected_response != $_POST["response"]) { return false; } else { *************** *** 252,263 **** function auth_validatelogin() { ! global $HTTP_POST_VARS, $challenge; ! $this->auth["uname"] = $HTTP_POST_VARS["username"]; ## This provides access for "loginform.ihtml" $this->db->query(sprintf("select user_id, perms, password ". "from %s where username = '%s'", $this->database_table, ! addslashes($HTTP_POST_VARS["username"]))); if ($this->db->num_rows() == 0) { --- 259,274 ---- function auth_validatelogin() { ! global $challenge; ! if (!isset($_POST)) { ! global $HTTP_POST_VARS; ! $_POST = $HTTP_POST_VARS; ! } ! $this->auth["uname"] = $_POST["username"]; ## This provides access for "loginform.ihtml" $this->db->query(sprintf("select user_id, perms, password ". "from %s where username = '%s'", $this->database_table, ! addslashes($_POST["username"]))); if ($this->db->num_rows() == 0) { *************** *** 270,278 **** $pass = $this->db->f("password"); ## Password is stored as a md5 hash } ! $expected_response = md5("$HTTP_POST_VARS[username]:$pass:$challenge"); ## True when JS is disabled ! if ($HTTP_POST_VARS["response"] == "") { ! if (md5($HTTP_POST_VARS["password"]) != $pass) { ## md5 hash for non-JavaScript browsers return false; } else { --- 281,289 ---- $pass = $this->db->f("password"); ## Password is stored as a md5 hash } ! $expected_response = md5("$_POST[username]:$pass:$challenge"); ## True when JS is disabled ! if ($_POST["response"] == "") { ! if (md5($_POST["password"]) != $pass) { ## md5 hash for non-JavaScript browsers return false; } else { *************** *** 283,287 **** ## Response is set, JS is enabled ! if ($expected_response != $HTTP_POST_VARS["response"]) { return false; } else { --- 294,298 ---- ## Response is set, JS is enabled ! if ($expected_response != $_POST["response"]) { return false; } else { Index: loginform.ihtml =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/loginform.ihtml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** loginform.ihtml 2 Apr 2002 23:23:12 -0000 1.3 --- loginform.ihtml 12 Jan 2007 21:47:27 -0000 1.4 *************** *** 37,42 **** <?php ! global $HTTP_POST_VARS; ! if ( isset($HTTP_POST_VARS["username"]) ) { ?> <!-- failed login code --> --- 37,45 ---- <?php ! if (!isset($_POST)) { ! global $HTTP_POST_VARS; ! $_POST = $HTTP_POST_VARS; ! } ! if ( isset($_POST["username"]) ) { ?> <!-- failed login code --> Index: menu.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/menu.inc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** menu.inc 26 Apr 2002 12:29:40 -0000 1.4 --- menu.inc 12 Jan 2007 21:47:27 -0000 1.5 *************** *** 54,61 **** */ function get() { ! global $HTTP_SERVER_VARS; # Determine normalized current position in tree ! $this->map = $this->normalize_pos($HTTP_SERVER_VARS["PHP_SELF"]); # Determine menu levels up from current position --- 54,64 ---- */ function get() { ! if (!isset($_SERVER)) { ! global $HTTP_SERVER_VARS; ! $_SERVER = $HTTP_SERVER_VARS; ! } # Determine normalized current position in tree ! $this->map = $this->normalize_pos($_SERVER["PHP_SELF"]); # Determine menu levels up from current position *************** *** 169,177 **** */ function get_title() { ! global $HTTP_SERVER_VARS; $this->title = ""; # Determine normalized current position in tree ! $this->map = $this->normalize_pos($HTTP_SERVER_VARS["PHP_SELF"]); # Determine menu levels up from current position --- 172,183 ---- */ function get_title() { ! if (!isset($_SERVER)) { ! global $HTTP_SERVER_VARS; ! $_SERVER = $HTTP_SERVER_VARS; ! } $this->title = ""; # Determine normalized current position in tree ! $this->map = $this->normalize_pos($_SERVER["PHP_SELF"]); # Determine menu levels up from current position Index: oohforms.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/oohforms.inc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** oohforms.inc 10 Apr 2006 20:02:26 -0000 1.8 --- oohforms.inc 12 Jan 2007 21:47:27 -0000 1.9 *************** *** 17,29 **** function marshal_dispatch($m, $func) { ! global $HTTP_POST_VARS, $HTTP_POST_FILES; $vname = $this->name; if (isset($GLOBALS[$vname])) { $val = $GLOBALS[$vname]; ! } elseif (isset($HTTP_POST_VARS[$vname])) { ! $val = $HTTP_POST_VARS[$vname]; ! } elseif (isset($HTTP_POST_FILES[$vname])) { ! $val = $HTTP_POST_FILES[$vname]; } else { $val = ''; --- 17,33 ---- function marshal_dispatch($m, $func) { ! if (!isset($_POST)) { ! global $HTTP_POST_VARS, $HTTP_POST_FILES; ! $_POST = $HTTP_POST_VARS; ! $_FILES = $HTTP_POST_FILES; ! } $vname = $this->name; if (isset($GLOBALS[$vname])) { $val = $GLOBALS[$vname]; ! } elseif (isset($_POST[$vname])) { ! $val = $_POST[$vname]; ! } elseif (isset($_FILES[$vname])) { ! $val = $_FILES[$vname]; } else { $val = ''; *************** *** 174,178 **** function get_start($jvs_name="", $method="", $action="", $target="", $form_name="") { ! global $HTTP_SERVER_VARS; $str = ""; --- 178,185 ---- function get_start($jvs_name="", $method="", $action="", $target="", $form_name="") { ! if (!isset($_SERVER)) { ! global $HTTP_SERVER_VARS; ! $_SERVER = $HTTP_SERVER_VARS; ! } $str = ""; *************** *** 184,188 **** } if (!$action) { ! $action = $HTTP_SERVER_VARS["PHP_SELF"]; } if (!$target) { --- 191,195 ---- } if (!$action) { ! $action = $_SERVER["PHP_SELF"]; } if (!$target) { Index: session.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/session.inc,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** session.inc 10 Apr 2006 20:02:07 -0000 1.21 --- session.inc 12 Jan 2007 21:47:27 -0000 1.22 *************** *** 90,94 **** function get_id($id = "") { ! global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_SERVER_VARS; $this->newid=true; --- 90,100 ---- function get_id($id = "") { ! if (!isset($_POST)) { ! global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_SERVER_VARS; ! $_COOKIE = $HTTP_COOKIE_VARS; ! $_POST = $HTTP_POST_VARS; ! $_GET = $HTTP_GET_VARS; ! $_SERVER = $HTTP_SERVER_VARS; ! } $this->newid=true; *************** *** 99,111 **** switch ($this->mode) { case "get": ! $id = isset($HTTP_GET_VARS[$this->name]) ? ! $HTTP_GET_VARS[$this->name] : ! ( isset($HTTP_POST_VARS[$this->name]) ? ! $HTTP_POST_VARS[$this->name] : "") ; break; case "cookie": ! $id = isset($HTTP_COOKIE_VARS[$this->name]) ? ! $HTTP_COOKIE_VARS[$this->name] : ""; break; default: --- 105,117 ---- switch ($this->mode) { case "get": ! $id = isset($_GET[$this->name]) ? ! $_GET[$this->name] : ! ( isset($_POST[$this->name]) ? ! $_POST[$this->name] : "") ; break; case "cookie": ! $id = isset($_COOKIE[$this->name]) ? ! $_COOKIE[$this->name] : ""; break; default: *************** *** 143,150 **** // Remove session ID info from QUERY String - it is in cookie ! if ( isset($HTTP_SERVER_VARS["QUERY_STRING"]) && ("" != $HTTP_SERVER_VARS["QUERY_STRING"]) ) { ! $HTTP_SERVER_VARS["QUERY_STRING"] = ereg_replace( "(^|&)".quotemeta(urlencode($this->name))."=(.)*(&|$)", ## subst *any* preexistent sess ! "\\1", $HTTP_SERVER_VARS["QUERY_STRING"]); } break; --- 149,156 ---- // Remove session ID info from QUERY String - it is in cookie ! if ( isset($_SERVER["QUERY_STRING"]) && ("" != $_SERVER["QUERY_STRING"]) ) { ! $_SERVER["QUERY_STRING"] = ereg_replace( "(^|&)".quotemeta(urlencode($this->name))."=(.)*(&|$)", ## subst *any* preexistent sess ! "\\1", $_SERVER["QUERY_STRING"]); } break; *************** *** 159,167 **** } ! if ( isset($HTTP_SERVER_VARS["QUERY_STRING"]) && ("" != $HTTP_SERVER_VARS["QUERY_STRING"]) ) { ! $HTTP_SERVER_VARS["QUERY_STRING"] = ereg_replace( # "(^|&)".quotemeta(urlencode($this->name))."=".$id."(&|$)", "(^|&)".quotemeta(urlencode($this->name))."=(.)*(&|$)", ## subst *any* preexistent sess ! "\\1", $HTTP_SERVER_VARS["QUERY_STRING"]); } break; --- 165,173 ---- } ! if ( isset($_SERVER["QUERY_STRING"]) && ("" != $_SERVER["QUERY_STRING"]) ) { ! $_SERVER["QUERY_STRING"] = ereg_replace( # "(^|&)".quotemeta(urlencode($this->name))."=".$id."(&|$)", "(^|&)".quotemeta(urlencode($this->name))."=(.)*(&|$)", ## subst *any* preexistent sess ! "\\1", $_SERVER["QUERY_STRING"]); } break; *************** *** 178,182 **** ## abandon a session. function put_id() { ! global $HTTP_COOKIE_VARS; switch ($this->mode) { --- 184,191 ---- ## abandon a session. function put_id() { ! if (!isset($_COOKIE)) { ! global $HTTP_COOKIE_VARS; ! $_COOKIE = $HTTP_COOKIE_VARS; ! } switch ($this->mode) { *************** *** 184,188 **** $this->name = $this->cookiename == "" ? $this->classname : $this->cookiename; SetCookie($this->name, "", 0, $this->cookie_path, $this->cookie_domain); ! $HTTP_COOKIE_VARS[$this->name] = ""; break; --- 193,197 ---- $this->name = $this->cookiename == "" ? $this->classname : $this->cookiename; SetCookie($this->name, "", 0, $this->cookie_path, $this->cookie_domain); ! $_COOKIE[$this->name] = ""; break; *************** *** 238,246 **** function self_url() { ! global $HTTP_SERVER_VARS; ! return $this->url($HTTP_SERVER_VARS["PHP_SELF"] . ! ((isset($HTTP_SERVER_VARS["QUERY_STRING"]) && ("" != $HTTP_SERVER_VARS["QUERY_STRING"])) ! ? "?" . $HTTP_SERVER_VARS["QUERY_STRING"] : "")); } --- 247,258 ---- function self_url() { ! if (!isset($_SERVER)) { ! global $HTTP_SERVER_VARS; ! $_SERVER = $HTTP_SERVER_VARS; ! } ! return $this->url($_SERVER["PHP_SELF"] . ! ((isset($_SERVER["QUERY_STRING"]) && ("" != $_SERVER["QUERY_STRING"])) ! ? "?" . $_SERVER["QUERY_STRING"] : "")); } *************** *** 272,279 **** function add_query($qarray) { ! global $HTTP_SERVER_VARS; ! if ((isset($HTTP_SERVER_VARS["QUERY_STRING"]) ! && ("" != $HTTP_SERVER_VARS["QUERY_STRING"])) || ($this->mode == "get")) { $sep_char = "&"; --- 284,294 ---- function add_query($qarray) { ! if (!isset($_SERVER)) { ! global $HTTP_SERVER_VARS; ! $_SERVER = $HTTP_SERVER_VARS; ! } ! if ((isset($_SERVER["QUERY_STRING"]) ! && ("" != $_SERVER["QUERY_STRING"])) || ($this->mode == "get")) { $sep_char = "&"; *************** *** 390,412 **** ## function reimport_get_vars() { ! $this->reimport_any_vars("HTTP_GET_VARS"); } function reimport_post_vars() { ! $this->reimport_any_vars("HTTP_POST_VARS"); } function reimport_cookie_vars() { ! $this->reimport_any_vars("HTTP_COOKIE_VARS"); } function reimport_any_vars($arrayname) { ! global $$arrayname; ! if (!is_array($$arrayname)) return; ! reset($$arrayname); ! while(list($key, $val) = each($$arrayname)) { $GLOBALS[$key] = $val; } --- 405,443 ---- ## function reimport_get_vars() { ! $this->reimport_any_vars("_GET"); } function reimport_post_vars() { ! $this->reimport_any_vars("_POST"); } function reimport_cookie_vars() { ! $this->reimport_any_vars("_COOKIE"); } function reimport_any_vars($arrayname) { ! $arrayname = strtoupper($arrayname); ! if (ereg('^HTTP(_.+)_VARS$', $arrayname, $reg)) { ! $arrayname = $reg[1]; ! } ! if (!ereg('^_', $arrayname)) { ! $arrayname = "_" . $arrayname; ! } ! if (!isset(${$arrayname})) { ! switch($arrayname) { ! case "_COOKIE": ! case "_GET": ! case "_POST": ! global ${"HTTP".$arrayname."_VARS"}; ! ${arrayname} = ${"HTTP".$arrayname."_VARS"}; ! } ! } ! if (!is_array(${$arrayname}) or empty(${$arrayname})) { return; + } ! reset(${$arrayname}); ! while(list($key, $val) = each(${$arrayname})) { $GLOBALS[$key] = $val; } *************** *** 429,439 **** function release_token($sid = "") { ! global $HTTP_COOKIE_VARS, $HTTP_POST_VARS, $HTTP_GET_VARS, ! $HTTP_SERVER_VARS; # set the mode for this run if ( isset($this->fallback_mode) && ("get" == $this->fallback_mode) && ("cookie" == $this->mode) ! && (! isset($HTTP_COOKIE_VARS[$this->name])) ) { $this->mode = $this->fallback_mode; } --- 460,475 ---- function release_token($sid = "") { ! if (!isset($_POST)) { ! global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_SERVER_VARS; ! $_COOKIE = $HTTP_COOKIE_VARS; ! $_POST = $HTTP_POST_VARS; ! $_GET = $HTTP_GET_VARS; ! $_SERVER = $HTTP_SERVER_VARS; ! } # set the mode for this run if ( isset($this->fallback_mode) && ("get" == $this->fallback_mode) && ("cookie" == $this->mode) ! && (! isset($_COOKIE[$this->name])) ) { $this->mode = $this->fallback_mode; } *************** *** 444,449 **** if ($this->newid) { ! if ( isset($HTTP_SERVER_VARS["HTTPS"]) ! && $HTTP_SERVER_VARS["HTTPS"] == 'on' ) { ## You will need to fix suexec as well, if you ## use Apache and CGI PHP --- 480,485 ---- if ($this->newid) { ! if ( isset($_SERVER["HTTPS"]) ! && $_SERVER["HTTPS"] == 'on' ) { ## You will need to fix suexec as well, if you ## use Apache and CGI PHP *************** *** 454,458 **** $this->freeze(); header("Location: " . $PROTOCOL . "://" . ! $HTTP_SERVER_VARS["HTTP_HOST"] . $this->self_url()); exit; } --- 490,494 ---- $this->freeze(); header("Location: " . $PROTOCOL . "://" . ! $_SERVER["HTTP_HOST"] . $this->self_url()); exit; } Index: session4.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/session4.inc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** session4.inc 29 Jul 2006 10:22:36 -0000 1.5 --- session4.inc 12 Jan 2007 21:47:27 -0000 1.6 *************** *** 334,343 **** */ function put_id() { ! global $HTTP_COOKIE_VARS; if (get_cfg_var ('session.use_cookies') == 1) { $cookie_params = session_get_cookie_params(); setCookie($this->name, '', 0, $cookie_params['path'], $cookie_params['domain']); ! $HTTP_COOKIE_VARS[$this->name] = ""; } --- 334,346 ---- */ function put_id() { ! if (!isset($_COOKIE)) { ! global $HTTP_COOKIE_VARS; ! $_COOKIE = $HTTP_COOKIE_VARS; ! } if (get_cfg_var ('session.use_cookies') == 1) { $cookie_params = session_get_cookie_params(); setCookie($this->name, '', 0, $cookie_params['path'], $cookie_params['domain']); ! $_COOKIE[$this->name] = ""; } *************** *** 375,379 **** */ function url($url) { ! global $HTTP_COOKIE_VARS; if ($this->trans_id_enabled) --- 378,385 ---- */ function url($url) { ! if (!isset($_COOKIE)) { ! global $HTTP_COOKIE_VARS; ! $_COOKIE = $HTTP_COOKIE_VARS; ! } if ($this->trans_id_enabled) *************** *** 386,390 **** $url = ereg_replace("[&?]+$", "", $url); ! if (!$HTTP_COOKIE_VARS[$this->name]) { $url .= ( strpos($url, "?") != false ? "&" : "?" ) . urlencode($this->name) . "=" . $this->id; } --- 392,396 ---- $url = ereg_replace("[&?]+$", "", $url); ! if (!$_COOKIE[$this->name]) { $url .= ( strpos($url, "?") != false ? "&" : "?" ) . urlencode($this->name) . "=" . $this->id; } *************** *** 418,426 **** */ function self_url() { ! global $HTTP_SERVER_VARS; ! return $this->url($HTTP_SERVER_VARS["PHP_SELF"] . ! ((isset($HTTP_SERVER_VARS["QUERY_STRING"]) && ("" != $HTTP_SERVER_VARS["QUERY_STRING"])) ! ? "?" . $HTTP_SERVER_VARS["QUERY_STRING"] : "")); # return $this->url(getenv('REQUEST_URI')); } // end func self_url --- 424,435 ---- */ function self_url() { ! if (!isset($_SERVER)) { ! global $HTTP_SERVER_VARS; ! $_SERVER = $HTTP_SERVER_VARS; ! } ! return $this->url($_SERVER["PHP_SELF"] . ! ((isset($_SERVER["QUERY_STRING"]) && ("" != $_SERVER["QUERY_STRING"])) ! ? "?" . $_SERVER["QUERY_STRING"] : "")); # return $this->url(getenv('REQUEST_URI')); } // end func self_url *************** *** 614,618 **** */ function reimport_get_vars() { ! $this->reimport_any_vars("HTTP_GET_VARS"); } // end func reimport_get_vars --- 623,627 ---- */ function reimport_get_vars() { ! $this->reimport_any_vars("_GET"); } // end func reimport_get_vars *************** *** 623,627 **** */ function reimport_post_vars() { ! $this->reimport_any_vars("HTTP_POST_VARS"); } // end func reimport_post_vars --- 632,636 ---- */ function reimport_post_vars() { ! $this->reimport_any_vars("_POST"); } // end func reimport_post_vars *************** *** 632,636 **** */ function reimport_cookie_vars() { ! $this->reimport_any_vars("HTTP_COOKIE_VARS"); } // end func reimport_cookie_vars --- 641,645 ---- */ function reimport_cookie_vars() { ! $this->reimport_any_vars("_COOKIE"); } // end func reimport_cookie_vars *************** *** 641,646 **** */ function reimport_any_vars($arrayname) { ! global $$arrayname; ! $GLOBALS = array_merge ($GLOBALS, $arrayname); } // end func reimport_any_vars --- 650,675 ---- */ function reimport_any_vars($arrayname) { ! $arrayname = strtoupper($arrayname); ! if (ereg('^HTTP(_.+)_VARS$', $arrayname, $reg)) { ! $arrayname = $reg[1]; ! } ! if (!ereg('^_', $arrayname)) { ! $arrayname = "_" . $arrayname; ! } ! if (!isset(${$arrayname})) { ! switch($arrayname) { ! case "_COOKIE": ! case "_GET": ! case "_POST": ! global ${"HTTP".$arrayname."_VARS"}; ! ${arrayname} = ${"HTTP".$arrayname."_VARS"}; ! } ! } ! ! if (!is_array(${$arrayname}) or empty(${$arrayname})) { ! return; ! } ! ! $GLOBALS = array_merge ($GLOBALS, ${$arrayname}); } // end func reimport_any_vars Index: setup.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/setup.inc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** setup.inc 19 Mar 2002 22:32:25 -0000 1.2 --- setup.inc 12 Jan 2007 21:47:27 -0000 1.3 *************** *** 34,38 **** # ! global $HTTP_SERVER_VARS; $db = new DB_Example; --- 34,41 ---- # ! if (!isset($_SERVER)) { ! global $HTTP_SERVER_VARS; ! $_SERVER = $HTTP_SERVER_VARS; ! } $db = new DB_Example; *************** *** 45,51 **** $sess->id, $now, ! $HTTP_SERVER_VARS["HTTP_REFERER"], ! $HTTP_SERVER_VARS["REMOTE_ADDR"], ! $HTTP_SERVER_VARS["HTTP_USER_AGENT"]); $db->query($query); --- 48,54 ---- $sess->id, $now, ! $_SERVER["HTTP_REFERER"], ! $_SERVER["REMOTE_ADDR"], ! $_SERVER["HTTP_USER_AGENT"]); $db->query($query); Index: tpl_form.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/tpl_form.inc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tpl_form.inc 6 Apr 2006 03:45:26 -0000 1.5 --- tpl_form.inc 12 Jan 2007 21:47:27 -0000 1.6 *************** *** 70,74 **** # some time later. function get_default_values() { ! global $HTTP_POST_VARS, $HTTP_POST_FILES; if (! is_object($this->form_data)) { $this->setup(); --- 70,78 ---- # some time later. function get_default_values() { ! if (!isset($_POST)) { ! global $HTTP_POST_VARS, $HTTP_POST_FILES; ! $_POST = $HTTP_POST_VARS; ! $_FILES = $HTTP_POST_FILES; ! } if (! is_object($this->form_data)) { $this->setup(); *************** *** 79,86 **** $vn = $el->name; ! if (isset($HTTP_POST_VARS[$vn])) { ! $vn_val = $HTTP_POST_VARS[$vn]; ! } elseif (isset($HTTP_POST_FILES[$vn])) { ! $vn_val = $HTTP_POST_FILES[$vn]; } elseif (isset($GLOBALS[$vn])) { $vn_val = $GLOBALS[$vn]; --- 83,90 ---- $vn = $el->name; ! if (isset($_POST[$vn])) { ! $vn_val = $_POST[$vn]; ! } elseif (isset($_FILES[$vn])) { ! $vn_val = $_FILES[$vn]; } elseif (isset($GLOBALS[$vn])) { $vn_val = $GLOBALS[$vn]; *************** *** 114,121 **** # error and sets $this->error accordingly. function validate() { ! global $HTTP_POST_VARS; ! if (isset($HTTP_POST_VARS['form_name'])) { ! $form_name = $HTTP_POST_VARS['form_name']; } else { $form_name = ''; --- 118,128 ---- # error and sets $this->error accordingly. function validate() { ! if (!isset($_POST)) { ! global $HTTP_POST_VARS; ! $_POST = $HTTP_POST_VARS; ! } ! if (isset($_POST['form_name'])) { ! $form_name = $_POST['form_name']; } else { $form_name = ''; *************** *** 151,162 **** # class and with ".ihtml" extension. function display() { ! global $sess, $HTTP_POST_VARS, $HTTP_SERVER_VARS; // I guess some people use $PHP_SELF in their include files // otherwise this should be removed completely - layne_weathers ! $PHP_SELF = $HTTP_SERVER_VARS["PHP_SELF"]; ! if (isset($HTTP_POST_VARS['form_name'])) { ! $form_name = $HTTP_POST_VARS['form_name']; } else { $form_name = ''; --- 158,174 ---- # class and with ".ihtml" extension. function display() { ! global $sess; ! if (!isset($_POST)) { ! global $HTTP_POST_VARS, $HTTP_SERVER_VARS; ! $_POST = $HTTP_POST_VARS; ! $_SERVER = $HTTP_SERVER_VARS; ! } // I guess some people use $PHP_SELF in their include files // otherwise this should be removed completely - layne_weathers ! $PHP_SELF = $_SERVER["PHP_SELF"]; ! if (isset($_POST['form_name'])) { ! $form_name = $_POST['form_name']; } else { $form_name = ''; |
From: Layne W. <lay...@us...> - 2007-01-12 21:47:32
|
Update of /cvsroot/phplib/php-lib-stable In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4474 Modified Files: CHANGES Log Message: prefer auto-globals (i.e. $_GET instead of $HTTP_GET_VARS) allow for "register_long_arrays" INI setting in PHP5 to be turned off as this disables the longer arrays Index: CHANGES =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/CHANGES,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** CHANGES 23 Feb 2006 10:30:07 -0000 1.35 --- CHANGES 12 Jan 2007 21:47:27 -0000 1.36 *************** *** 1,4 **** --- 1,32 ---- $Id$ + 12-Jan-2007 layne_weathers + - db_mysql.inc, db_odbc.inc - added disconnect() function for closing + connections (useful/necessary when using non-persistent connections) + - db_oci8.inc - clear $this->Link_ID on disconnect(), prevent assuming + the connection was dropped + - prefer auto-globals (i.e. $_GET instead of $HTTP_GET_VARS), allow for + "register_long_arrays" INI setting in PHP5 to be turned off, this disables + the longer arrays + - affected files: + pages/defauth.php3 + pages/admin/new_user.php3 + pages/admin/new_user_alt.php3 + pages/admin/new_user_md5.php3 + php/auth.inc + php/auth4.inc + php/crcloginform.ihtml + php/crloginform.ihtml + php/layout_html.inc + php/local.inc + php/local4.inc + php/loginform.ihtml + php/menu.inc + php/oohforms.inc + php/session.inc + php/session4.inc + php/setup.inc + php/tpl_form.inc + 23-Feb-2006 richardarcher - security fix to prevent possible remote code execution. |
From: Layne W. <lay...@us...> - 2007-01-12 21:47:32
|
Update of /cvsroot/phplib/php-lib-stable/pages/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4474/pages/admin Modified Files: new_user.php3 new_user_alt.php3 new_user_md5.php3 Log Message: prefer auto-globals (i.e. $_GET instead of $HTTP_GET_VARS) allow for "register_long_arrays" INI setting in PHP5 to be turned off as this disables the longer arrays Index: new_user.php3 =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/pages/admin/new_user.php3,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** new_user.php3 25 Apr 2002 06:26:45 -0000 1.4 --- new_user.php3 12 Jan 2007 21:47:27 -0000 1.5 *************** *** 46,53 **** ## Pull our form variables out of HTTP_POST_VARS ! if (isset($HTTP_POST_VARS['username'])) $username = $HTTP_POST_VARS['username']; ! if (isset($HTTP_POST_VARS['password'])) $password = $HTTP_POST_VARS['password']; ! if (isset($HTTP_POST_VARS['u_id'])) $u_id = $HTTP_POST_VARS['u_id']; ! if (isset($HTTP_POST_VARS['perms'])) $perms = $HTTP_POST_VARS['perms']; ### --- 46,56 ---- ## Pull our form variables out of HTTP_POST_VARS ! if (!isset($_POST)) { ! $_POST = $HTTP_POST_VARS; ! } ! if (isset($_POST['username'])) $username = $_POST['username']; ! if (isset($_POST['password'])) $password = $_POST['password']; ! if (isset($_POST['u_id'])) $u_id = $_POST['u_id']; ! if (isset($_POST['perms'])) $perms = $_POST['perms']; ### *************** *** 121,126 **** // Check if there was a submission ! while (is_array($HTTP_POST_VARS) ! && list($key, $val) = each($HTTP_POST_VARS)) { if($debug == 1) { printf("key +$key+, val +$val+<br>"); --- 124,129 ---- // Check if there was a submission ! while (is_array($_POST) ! && list($key, $val) = each($_POST)) { if($debug == 1) { printf("key +$key+, val +$val+<br>"); Index: new_user_alt.php3 =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/pages/admin/new_user_alt.php3,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** new_user_alt.php3 25 Apr 2002 06:26:45 -0000 1.3 --- new_user_alt.php3 12 Jan 2007 21:47:27 -0000 1.4 *************** *** 49,56 **** ## Pull our form variables out of HTTP_POST_VARS ! if (isset($HTTP_POST_VARS['username'])) $username = $HTTP_POST_VARS['username']; ! if (isset($HTTP_POST_VARS['password'])) $password = $HTTP_POST_VARS['password']; ! if (isset($HTTP_POST_VARS['u_id'])) $u_id = $HTTP_POST_VARS['u_id']; ! if (isset($HTTP_POST_VARS['perms'])) $perms = $HTTP_POST_VARS['perms']; ### --- 49,59 ---- ## Pull our form variables out of HTTP_POST_VARS ! if (!isset($_POST)) { ! $_POST = $HTTP_POST_VARS; ! } ! if (isset($_POST['username'])) $username = $_POST['username']; ! if (isset($_POST['password'])) $password = $_POST['password']; ! if (isset($_POST['u_id'])) $u_id = $_POST['u_id']; ! if (isset($_POST['perms'])) $perms = $_POST['perms']; ### *************** *** 118,123 **** ## Check if there was a submission ! while ( is_array($HTTP_POST_VARS) ! && list($key, $val) = each($HTTP_POST_VARS)) { switch ($key) { --- 121,126 ---- ## Check if there was a submission ! while ( is_array($_POST) ! && list($key, $val) = each($_POST)) { switch ($key) { Index: new_user_md5.php3 =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/pages/admin/new_user_md5.php3,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** new_user_md5.php3 21 Apr 2004 10:51:52 -0000 1.5 --- new_user_md5.php3 12 Jan 2007 21:47:27 -0000 1.6 *************** *** 45,53 **** ## Pull our form variables out of HTTP_POST_VARS ! if (isset($HTTP_POST_VARS['username'])) $username = $HTTP_POST_VARS['username']; ! if (isset($HTTP_POST_VARS['password'])) $password = $HTTP_POST_VARS['password']; ! if (isset($HTTP_POST_VARS['hashpass'])) $hashpass = $HTTP_POST_VARS['hashpass']; ! if (isset($HTTP_POST_VARS['u_id'])) $u_id = $HTTP_POST_VARS['u_id']; ! if (isset($HTTP_POST_VARS['perms'])) $perms = $HTTP_POST_VARS['perms']; ### --- 45,56 ---- ## Pull our form variables out of HTTP_POST_VARS ! if (!isset($_POST)) { ! $_POST = $HTTP_POST_VARS; ! } ! if (isset($_POST['username'])) $username = $_POST['username']; ! if (isset($_POST['password'])) $password = $_POST['password']; ! if (isset($_POST['hashpass'])) $hashpass = $_POST['hashpass']; ! if (isset($_POST['u_id'])) $u_id = $_POST['u_id']; ! if (isset($_POST['perms'])) $perms = $_POST['perms']; ### *************** *** 118,126 **** ## Some debug output - can be useful to see what's going on #$debug_output = "<br>\n"; ! #reset($HTTP_POST_VARS); ! #while(list($var,$value)=each($HTTP_POST_VARS)) { # $debug_output .= "$var: $value<br>\n"; #} ! #reset($HTTP_POST_VARS); #my_msg($debug_output); --- 121,129 ---- ## Some debug output - can be useful to see what's going on #$debug_output = "<br>\n"; ! #reset($_POST); ! #while(list($var,$value)=each($_POST)) { # $debug_output .= "$var: $value<br>\n"; #} ! #reset($_POST); #my_msg($debug_output); *************** *** 158,163 **** ## Check if there was a submission ! while ( is_array($HTTP_POST_VARS) ! && list($key, $val) = each($HTTP_POST_VARS)) { switch ($key) { --- 161,166 ---- ## Check if there was a submission ! while ( is_array($_POST) ! && list($key, $val) = each($_POST)) { switch ($key) { |
From: Layne W. <lay...@us...> - 2007-01-12 20:26:05
|
Update of /cvsroot/phplib/php-lib-stable/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5951/php Modified Files: db_oci8.inc Log Message: clear link id on disconnect() Index: db_oci8.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/db_oci8.inc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** db_oci8.inc 19 Feb 2005 15:20:48 -0000 1.8 --- db_oci8.inc 12 Jan 2007 20:26:03 -0000 1.9 *************** *** 386,389 **** --- 386,390 ---- } OCILogoff($this->Link_ID); + $this->Link_ID = 0; } |
From: Layne W. <lay...@us...> - 2007-01-12 20:25:34
|
Update of /cvsroot/phplib/php-lib-stable/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5796/php Modified Files: db_mysql.inc db_odbc.inc Log Message: add disconnect() to allow better use of non-persistent connections Index: db_mysql.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/db_mysql.inc,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** db_mysql.inc 19 Feb 2005 15:20:18 -0000 1.13 --- db_mysql.inc 12 Jan 2007 20:25:30 -0000 1.14 *************** *** 98,101 **** --- 98,108 ---- } + function disconnect() { + if(!$this->PConnect and $this->Link_ID) { + mysql_close($this->Link_ID); + $this->Link_ID = 0; + } + } + /* public: discard the query result */ function free() { Index: db_odbc.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/db_odbc.inc,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** db_odbc.inc 23 Jul 2004 20:36:29 -0000 1.6 --- db_odbc.inc 12 Jan 2007 20:25:30 -0000 1.7 *************** *** 98,101 **** --- 98,108 ---- } + function disconnect() { + if($this->Link_ID) { + odbc_close($this->Link_ID); + $this->Link_ID = 0; + } + } + /* public: discard the query result */ function free() { |
From: Florian C. <ch...@us...> - 2006-07-29 10:55:32
|
Update of /cvsroot/phplib/php-lib-stable/stuff In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4881 Modified Files: create_database.oracle Log Message: Even if active_sessions table should not be used anymore with php4 sessions, I finally corrected the VAL datatype that has been false for years in this script! ;-) Index: create_database.oracle =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/stuff/create_database.oracle,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** create_database.oracle 17 Apr 2000 16:40:17 -0000 1.1.1.1 --- create_database.oracle 29 Jul 2006 10:55:30 -0000 1.2 *************** *** 15,19 **** SID VARCHAR2(32) not null, NAME VARCHAR2(32) not null, ! VAL LONG null , CHANGED VARCHAR2(14) not null, constraint PK_ACTIVE_SESSIONS primary key (SID, NAME) --- 15,19 ---- SID VARCHAR2(32) not null, NAME VARCHAR2(32) not null, ! VAL VARCHAR2(2000) null , CHANGED VARCHAR2(14) not null, constraint PK_ACTIVE_SESSIONS primary key (SID, NAME) *************** *** 35,39 **** CT_NAME VARCHAR2(32) not null, CT_POS VARCHAR2(6) not null, ! CT_VAL LONG null , CT_CHANGED VARCHAR2(14) not null, constraint PK_ACTIVE_SESSIONS_SPLIT primary key (CT_SID, CT_NAME, CT_POS) --- 35,39 ---- CT_NAME VARCHAR2(32) not null, CT_POS VARCHAR2(6) not null, ! CT_VAL VARCHAR2(2000) null , CT_CHANGED VARCHAR2(14) not null, constraint PK_ACTIVE_SESSIONS_SPLIT primary key (CT_SID, CT_NAME, CT_POS) |
From: Florian C. <ch...@us...> - 2006-07-29 10:49:19
|
Update of /cvsroot/phplib/php-lib-stable/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1365 Modified Files: auth4.inc Log Message: Correction of function start(): when you used default auth (nobody=true) and then tried to access a protected page, the loginform displayed (normal) but if you did not log in, you couldn't access unprotected pages anymore because loginform was always displayed (abnormal). Index: auth4.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/auth4.inc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** auth4.inc 4 Oct 2002 14:13:27 -0000 1.1 --- auth4.inc 29 Jul 2006 10:45:56 -0000 1.2 *************** *** 182,192 **** $this->auth["refresh"] = time() + (60 * $this->refresh); return true; ! } else { ! $this->auth_loginform(); ! $this->auth["uid"] = "form"; ! $this->auth["exp"] = 0x7fffffff; ! $this->auth["refresh"] = 0x7fffffff; ! $sess->freeze(); ! exit; } break; --- 182,203 ---- $this->auth["refresh"] = time() + (60 * $this->refresh); return true; ! } ! else { ! if ($this->nobody){ ! $this-> unauth(); ! # Authenticate as nobody ! $this-> auth["uid"] = "nobody"; ! $this-> auth["exp"] = 0x7fffffff; ! $this-> auth["refresh"] = 0x7fffffff; ! return true; ! } ! else { ! $this->auth_loginform(); ! $this->auth["uid"] = "form"; ! $this->auth["exp"] = 0x7fffffff; ! $this->auth["refresh"] = 0x7fffffff; ! $sess->freeze(); ! exit; ! } } break; |
From: Florian C. <ch...@us...> - 2006-07-29 10:22:40
|
Update of /cvsroot/phplib/php-lib-stable/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25894 Modified Files: session4.inc Log Message: In function set_tokenname, setting lifetime of cookie was made in an incorrect way. Now sessions work when based on cookie lifetime and not on browser session (lifetime>0) Index: session4.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/session4.inc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** session4.inc 27 Oct 2003 20:41:30 -0000 1.4 --- session4.inc 29 Jul 2006 10:22:36 -0000 1.5 *************** *** 574,578 **** if ($this->lifetime > 0) { ! $lifetime = time()+$this->lifetime*60; } else { $lifetime = 0; --- 574,579 ---- if ($this->lifetime > 0) { ! #$lifetime = time()+$this->lifetime*60; //this is incorrect ! $lifetime = $this->lifetime*60; } else { $lifetime = 0; |
From: Richard A. <ric...@us...> - 2006-04-10 20:02:31
|
Update of /cvsroot/phplib/php-lib-stable/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22051 Modified Files: oohforms.inc Log Message: Fix a warning. Thanks to Moritz Borgmann. Index: oohforms.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/oohforms.inc,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** oohforms.inc 6 Apr 2006 03:45:25 -0000 1.7 --- oohforms.inc 10 Apr 2006 20:02:26 -0000 1.8 *************** *** 399,407 **** while ($elrec) { $el = $elrec["ob"]; ! $this->elements[$el->name]["frozen"]=1; if ($flist) { ! next($flist); ! $elrec = $this->elements[current($flist)]; ! } else { next($this->elements); $elrec = current($this->elements); --- 399,412 ---- while ($elrec) { $el = $elrec["ob"]; ! $this->elements[$el->name]["frozen"] = 1; if ($flist) { ! if (next($flist)) { ! $elrec = $this->elements[current($flist)]; ! } ! else { ! $elrec = ""; ! } ! } ! else { next($this->elements); $elrec = current($this->elements); |
From: Richard A. <ric...@us...> - 2006-04-10 20:02:17
|
Update of /cvsroot/phplib/php-lib-stable/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21726 Modified Files: session.inc Log Message: Remove extra HTTP Status header because PHP automatically sends one when it sees a Location header. Thanks to Moritz Borgmann Index: session.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/session.inc,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** session.inc 23 Feb 2006 10:23:56 -0000 1.20 --- session.inc 10 Apr 2006 20:02:07 -0000 1.21 *************** *** 453,457 **** } $this->freeze(); - header("Status: 302 Moved Temporarily"); header("Location: " . $PROTOCOL . "://" . $HTTP_SERVER_VARS["HTTP_HOST"] . $this->self_url()); --- 453,456 ---- |
From: Richard A. <ric...@us...> - 2006-04-06 03:45:34
|
Update of /cvsroot/phplib/php-lib-stable/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4530 Modified Files: oohforms.inc tpl_form.inc Log Message: Fix register_globals bugs and other assorted problems. Thanks to Moritz Borgmann Index: oohforms.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/oohforms.inc,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** oohforms.inc 19 Feb 2005 15:22:16 -0000 1.6 --- oohforms.inc 6 Apr 2006 03:45:25 -0000 1.7 *************** *** 17,23 **** function marshal_dispatch($m, $func) { ! global $HTTP_POST_VARS; $vname = $this->name; ! return $this->$func($HTTP_POST_VARS["$vname"]); } --- 17,33 ---- function marshal_dispatch($m, $func) { ! global $HTTP_POST_VARS, $HTTP_POST_FILES; $vname = $this->name; ! ! if (isset($GLOBALS[$vname])) { ! $val = $GLOBALS[$vname]; ! } elseif (isset($HTTP_POST_VARS[$vname])) { ! $val = $HTTP_POST_VARS[$vname]; ! } elseif (isset($HTTP_POST_FILES[$vname])) { ! $val = $HTTP_POST_FILES[$vname]; ! } else { ! $val = ''; ! } ! return $this->$func($val); } Index: tpl_form.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/tpl_form.inc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tpl_form.inc 28 Feb 2005 15:24:34 -0000 1.4 --- tpl_form.inc 6 Apr 2006 03:45:26 -0000 1.5 *************** *** 70,73 **** --- 70,74 ---- # some time later. function get_default_values() { + global $HTTP_POST_VARS, $HTTP_POST_FILES; if (! is_object($this->form_data)) { $this->setup(); *************** *** 77,82 **** $el = $elrec["ob"]; $vn = $el->name; ! global $$vn; ! $fv[$el->name] = $$vn; } return $fv; --- 78,93 ---- $el = $elrec["ob"]; $vn = $el->name; ! ! if (isset($HTTP_POST_VARS[$vn])) { ! $vn_val = $HTTP_POST_VARS[$vn]; ! } elseif (isset($HTTP_POST_FILES[$vn])) { ! $vn_val = $HTTP_POST_FILES[$vn]; ! } elseif (isset($GLOBALS[$vn])) { ! $vn_val = $GLOBALS[$vn]; ! } else { ! $vn_val = ''; ! } ! ! $fv[$el->name] = $vn_val; } return $fv; *************** *** 91,97 **** return false; } while (list($var, $value) = each($fv)) { ! global $$var; ! $$var = $value; } $this->has_defaults = 1; --- 102,108 ---- return false; } + $fv["form_name"] = $this->classname; while (list($var, $value) = each($fv)) { ! $GLOBALS[$var] = $value; } $this->has_defaults = 1; *************** *** 103,107 **** # error and sets $this->error accordingly. function validate() { ! global $form_name; if (! is_object($this->form_data)) { $this->setup(); --- 114,125 ---- # error and sets $this->error accordingly. function validate() { ! global $HTTP_POST_VARS; ! ! if (isset($HTTP_POST_VARS['form_name'])) { ! $form_name = $HTTP_POST_VARS['form_name']; ! } else { ! $form_name = ''; ! } ! if (! is_object($this->form_data)) { $this->setup(); *************** *** 133,144 **** # class and with ".ihtml" extension. function display() { ! global $sess; ! global $form_name; // I guess some people use $PHP_SELF in their include files ! // otherwise these should be removed completely - layne_weathers ! global $HTTP_SERVER_VARS; $PHP_SELF = $HTTP_SERVER_VARS["PHP_SELF"]; if (! is_object($this->form_data)) { $this->setup(); --- 151,166 ---- # class and with ".ihtml" extension. function display() { ! global $sess, $HTTP_POST_VARS, $HTTP_SERVER_VARS; // I guess some people use $PHP_SELF in their include files ! // otherwise this should be removed completely - layne_weathers $PHP_SELF = $HTTP_SERVER_VARS["PHP_SELF"]; + if (isset($HTTP_POST_VARS['form_name'])) { + $form_name = $HTTP_POST_VARS['form_name']; + } else { + $form_name = ''; + } + if (! is_object($this->form_data)) { $this->setup(); |
From: Richard A. <ric...@us...> - 2006-03-14 22:16:30
|
Update of /cvsroot/phplib/php-lib-stable/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28399 Modified Files: ct_sql.inc Log Message: Bug #1449829 - Incompatibility with Postgres. Thanks to Carlos Tineo. Index: ct_sql.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/ct_sql.inc,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ct_sql.inc 19 Feb 2005 15:19:35 -0000 1.6 --- ct_sql.inc 14 Mar 2006 22:16:18 -0000 1.7 *************** *** 81,85 **** $id, $name); ! $squery = sprintf("select count(sid) count from %s where val='%s' and changed='%s' and sid='%s' and name='%s'", $this->database_table, $str, --- 81,85 ---- $id, $name); ! $squery = sprintf("select count(sid) as count from %s where val='%s' and changed='%s' and sid='%s' and name='%s'", $this->database_table, $str, |
From: Layne W. <lay...@us...> - 2005-08-06 16:38:05
|
Update of /cvsroot/phplib/php-lib/php/session In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19121/php/session Modified Files: session3.inc Log Message: Fixed session3.inc - get_hidden_id() now returns get_hidden_session() rather than hidden_session() (this prints the output) Index: session3.inc =================================================================== RCS file: /cvsroot/phplib/php-lib/php/session/session3.inc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** session3.inc 29 Aug 2001 07:26:44 -0000 1.8 --- session3.inc 6 Aug 2005 16:37:56 -0000 1.9 *************** *** 233,237 **** switch($this->mode) { case "get": ! return $this->hidden_session(); break; } --- 233,237 ---- switch($this->mode) { case "get": ! return $this->get_hidden_session(); break; } |
From: Layne W. <lay...@us...> - 2005-08-06 16:38:04
|
Update of /cvsroot/phplib/php-lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19121 Modified Files: CHANGES Log Message: Fixed session3.inc - get_hidden_id() now returns get_hidden_session() rather than hidden_session() (this prints the output) Index: CHANGES =================================================================== RCS file: /cvsroot/phplib/php-lib/CHANGES,v retrieving revision 1.191 retrieving revision 1.192 diff -C2 -d -r1.191 -r1.192 *** CHANGES 26 Feb 2002 08:14:37 -0000 1.191 --- CHANGES 6 Aug 2005 16:37:56 -0000 1.192 *************** *** 1,4 **** --- 1,8 ---- $Id$ + 06-Aug-2005 layne_weathers + - Fixed session3.inc - get_hidden_id() now returns get_hidden_session() + rather than hidden_session() (this prints the output) + 26-Feb-2002 richardarcher - Fixed [ #517150 ] prepend.php3 needs ct_cookie mods |
From: Layne W. <lay...@us...> - 2005-08-06 16:37:21
|
Update of /cvsroot/phplib/php-lib-stable In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19020 Modified Files: CHANGES Log Message: Fixed session.inc - get_hidden_id() now returns get_hidden_session() rather than hidden_session() (this prints the output) Index: CHANGES =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/CHANGES,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** CHANGES 19 Feb 2005 15:23:50 -0000 1.33 --- CHANGES 6 Aug 2005 16:37:12 -0000 1.34 *************** *** 1,4 **** --- 1,8 ---- $Id$ + 06-Aug-2005 layne_weathers + - Fixed session.inc - get_hidden_id() now returns get_hidden_session() + rather than hidden_session() (this prints the output) + 19-Feb-2005 layne_weathers - ct_sql.inc |
From: Layne W. <lay...@us...> - 2005-08-06 16:37:21
|
Update of /cvsroot/phplib/php-lib-stable/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19020/php Modified Files: session.inc Log Message: Fixed session.inc - get_hidden_id() now returns get_hidden_session() rather than hidden_session() (this prints the output) Index: session.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/session.inc,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** session.inc 27 Oct 2003 20:41:30 -0000 1.18 --- session.inc 6 Aug 2005 16:37:12 -0000 1.19 *************** *** 244,250 **** } ! function hidden_session() ! { ! printf("<input type=\"hidden\" name=\"%s\" value=\"%s\">\n", $this->name, $this->id); } --- 244,267 ---- } ! function get_hidden_session() { ! return sprintf("<input type=\"hidden\" name=\"%s\" value=\"%s\">\n", ! $this->name, ! $this->id); ! } ! ! function hidden_session() { ! print $this->get_hidden_session(); ! } ! ! function get_hidden_id() { ! switch($this->mode) { ! case "get": ! return $this->get_hidden_session(); ! break; ! } ! } ! ! function hidden_id() { ! print $this->get_hidden_id(); } |
From: Layne W. <lay...@us...> - 2005-02-28 15:24:43
|
Update of /cvsroot/phplib/php-lib-stable/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6538/php Modified Files: tpl_form.inc Log Message: add missing semicolon line 141 Index: tpl_form.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/tpl_form.inc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tpl_form.inc 19 Mar 2002 22:32:25 -0000 1.3 --- tpl_form.inc 28 Feb 2005 15:24:34 -0000 1.4 *************** *** 139,143 **** // otherwise these should be removed completely - layne_weathers global $HTTP_SERVER_VARS; ! $PHP_SELF = $HTTP_SERVER_VARS["PHP_SELF"] if (! is_object($this->form_data)) { --- 139,143 ---- // otherwise these should be removed completely - layne_weathers global $HTTP_SERVER_VARS; ! $PHP_SELF = $HTTP_SERVER_VARS["PHP_SELF"]; if (! is_object($this->form_data)) { |
From: Layne W. <lay...@us...> - 2005-02-19 15:23:58
|
Update of /cvsroot/phplib/php-lib-stable In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7118 Modified Files: CHANGES Log Message: Very minor fixes for ct_sql.inc and db_mysql.inc Added $Port to db_oci8.inc Fixed non-existent variables and bad variable checing in of_text.inc and oohforms.inc Thanks to Frank Bax for pointing out the of_text and oohforms problems Index: CHANGES =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/CHANGES,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** CHANGES 17 Aug 2004 20:59:29 -0000 1.32 --- CHANGES 19 Feb 2005 15:23:50 -0000 1.33 *************** *** 1,4 **** --- 1,20 ---- $Id$ + 19-Feb-2005 layne_weathers + - ct_sql.inc + - name count column in query, $db->f("count") instead of $db->f(0) + - db_mysql.inc + - suppress error messages on connection (if connection fails, + we'll use connect_failed()) + - db_oci8.inc + - added var $Port for using $full_connection_string to connect on port + other than 1521 + - of_text.inc + - fix $this->icase to $this->valid_icase + - oohforms.inc + - fixed warning notices by better checking of variables + - remove use of non-existent $this->method + - Thanks to Frank Bax for pointing out the of_text and oohforms problems + 17-Aug-2004 layne_weathers - db_oci8.inc - added optional shortcut var $Host: if set, will build full db |
From: Layne W. <lay...@us...> - 2005-02-19 15:22:26
|
Update of /cvsroot/phplib/php-lib-stable/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6927/php Modified Files: oohforms.inc Log Message: fixed warning notices by better checking of variables remove use of non-existent $this->method Thanks to Frank Bax for catching these problems Index: oohforms.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/oohforms.inc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** oohforms.inc 28 Apr 2002 04:05:30 -0000 1.5 --- oohforms.inc 19 Feb 2005 15:22:16 -0000 1.6 *************** *** 69,76 **** reset($a); while (list($k, $v) = each($a)) { ! if ($cv_tab[$k]=="ignore") { continue; } else { ! $k = ($cv_tab[$k] ? $cv_tab[$k] : $k); } $this->$k = $v; --- 69,76 ---- reset($a); while (list($k, $v) = each($a)) { ! if (!empty($cv_tab[$k]) and ("ignore"==$cv_tab[$k])) { continue; } else { ! $k = ((!empty($cv_tab[$k])) ? $cv_tab[$k] : $k); } $this->$k = $v; *************** *** 82,86 **** class of_hidden extends of_element { ! var $hidden=1; function of_hidden($a) { --- 82,86 ---- class of_hidden extends of_element { ! var $hidden=array(); function of_hidden($a) { *************** *** 206,210 **** $str = ""; ! if ($this->hidden) { reset($this->hidden); while (list($k, $elname) = each($this->hidden)) { --- 206,210 ---- $str = ""; ! if (is_array($this->hidden) and !empty($this->hidden)) { reset($this->hidden); while (list($k, $elname) = each($this->hidden)) { *************** *** 228,232 **** while (list($k, $elrec) = each($this->elements)) { $el = $elrec["ob"]; ! $str .= $el->self_get_js($elrec["ndx_array"]); } if (strlen($after)) { --- 228,232 ---- while (list($k, $elrec) = each($this->elements)) { $el = $elrec["ob"]; ! $str .= $el->self_get_js((!empty($elrec["ndx_array"])) ? $elrec["ndx_array"] : array()); } if (strlen($after)) { *************** *** 250,254 **** $cv_tab = array("select multiple"=>"select", "image"=>"submit"); ! if ($t = $cv_tab[$el["type"]]) { $t = ("of_" . $t); } else { --- 250,254 ---- $cv_tab = array("select multiple"=>"select", "image"=>"submit"); ! if (!empty($cv_tab[$el["type"]]) and $t = $cv_tab[$el["type"]]) { $t = ("of_" . $t); } else { *************** *** 266,274 **** $el = new $t($el); $el->type = $t; # as suggested by Michael Graham (ma...@th...) ! if ($el->isfile) { $this->isfile = true; } $this->elements[$el->name]["ob"] = $el; ! if ($el->hidden) { $this->hidden[] = $el->name; } --- 266,274 ---- $el = new $t($el); $el->type = $t; # as suggested by Michael Graham (ma...@th...) ! if (isset($el->isfile) and $el->isfile) { $this->isfile = true; } $this->elements[$el->name]["ob"] = $el; ! if (isset($el->hidden) and is_array($el->hidden)) { $this->hidden[] = $el->name; } *************** *** 306,310 **** } ! if ($this->elements[$name]["frozen"]) { $str .= $el->self_get_frozen($value, $this->elements[$name]["which"]++, $x); } else { --- 306,310 ---- } ! if (!empty($this->elements[$name]["frozen"])) { $str .= $el->self_get_frozen($value, $this->elements[$name]["which"]++, $x); } else { *************** *** 343,347 **** while ($elrec) { $el = $elrec["ob"]; ! if ($res = $el->marshal_dispatch($this->method, "self_validate")) { return $res; } --- 343,347 ---- while ($elrec) { $el = $elrec["ob"]; ! if ($res = $el->marshal_dispatch("", "self_validate")) { return $res; } *************** *** 367,371 **** while ($elrec) { $el = $elrec["ob"]; ! $el->marshal_dispatch($this->method, "self_load_defaults"); $this->elements[$el->name]["ob"] = $el; // no refs -> must copy back if ($deflist) { --- 367,371 ---- while ($elrec) { $el = $elrec["ob"]; ! $el->marshal_dispatch("", "self_load_defaults"); $this->elements[$el->name]["ob"] = $el; // no refs -> must copy back if ($deflist) { |
From: Layne W. <lay...@us...> - 2005-02-19 15:21:35
|
Update of /cvsroot/phplib/php-lib-stable/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6795/php Modified Files: of_text.inc Log Message: fix $this->icase to $this->valid_icase Thanks to Frank Bax for catching this problem Index: of_text.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/of_text.inc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** of_text.inc 28 Apr 2002 03:59:32 -0000 1.2 --- of_text.inc 19 Feb 2005 15:21:25 -0000 1.3 *************** *** 80,84 **** } if ($this->valid_e) { ! $flags = ($this->icase ? "gi" : "g"); $str .= "if (window.RegExp) {\n"; $str .= " var reg = new RegExp(\"$this->valid_regex\", \"$flags\");\n"; --- 80,84 ---- } if ($this->valid_e) { ! $flags = ($this->valid_icase ? "gi" : "g"); $str .= "if (window.RegExp) {\n"; $str .= " var reg = new RegExp(\"$this->valid_regex\", \"$flags\");\n"; *************** *** 103,109 **** return $this->length_e; } ! if ($this->valid_e && (($this->icase && !eregi($this->valid_regex, $v)) || ! (!$this->icase && !ereg($this->valid_regex, $v)))) { return $this->valid_e; --- 103,109 ---- return $this->length_e; } ! if ($this->valid_e && (($this->valid_icase && !eregi($this->valid_regex, $v)) || ! (!$this->valid_icase && !ereg($this->valid_regex, $v)))) { return $this->valid_e; |
From: Layne W. <lay...@us...> - 2005-02-19 15:20:57
|
Update of /cvsroot/phplib/php-lib-stable/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6647/php Modified Files: db_oci8.inc Log Message: added var $Port for using $full_connection_string to connect on port other than 1521 Index: db_oci8.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/db_oci8.inc,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** db_oci8.inc 17 Aug 2004 20:58:50 -0000 1.7 --- db_oci8.inc 19 Feb 2005 15:20:48 -0000 1.8 *************** *** 19,27 **** var $Host = ""; /* traditionally the full TNS name is placed in $Database; if having trouble with TNS resolution (and desiring a more legible configuration), place the host IP address in $Host and the Oracle SID in $Database as a shortcut - connect() will build a valid connection string using $full_connection_string */ var $Database = ""; var $User = ""; var $Password = ""; ! var $full_connection_string = "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=%s)(PORT=1521)))(CONNECT_DATA=(SID=%s)))"; var $Link_ID = 0; --- 19,28 ---- var $Host = ""; + var $Port = "1521"; /* traditionally the full TNS name is placed in $Database; if having trouble with TNS resolution (and desiring a more legible configuration), place the host IP address in $Host and the Oracle SID in $Database as a shortcut - connect() will build a valid connection string using $full_connection_string */ var $Database = ""; var $User = ""; var $Password = ""; ! var $full_connection_string = "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=%s)(PORT=%s)))(CONNECT_DATA=(SID=%s)))"; var $Link_ID = 0; *************** *** 74,78 **** } } ! $this->Link_ID = OCIPLogon($this->User, $this->Password, (($this->Host) ? sprintf($this->full_connection_string, $this->Host, $this->Database) : $this->Database)); if (!$this->Link_ID) { --- 75,79 ---- } } ! $this->Link_ID = OCIPLogon($this->User, $this->Password, (($this->Host) ? sprintf($this->full_connection_string, $this->Host, $this->Port, $this->Database) : $this->Database)); if (!$this->Link_ID) { |
From: Layne W. <lay...@us...> - 2005-02-19 15:20:29
|
Update of /cvsroot/phplib/php-lib-stable/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6561/php Modified Files: db_mysql.inc Log Message: suppress error messages on connection (if connection fails, we'll use connect_failed()) Index: db_mysql.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/db_mysql.inc,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** db_mysql.inc 23 Jul 2004 20:36:29 -0000 1.12 --- db_mysql.inc 19 Feb 2005 15:20:18 -0000 1.13 *************** *** 75,81 **** if(!$this->PConnect) { ! $this->Link_ID = mysql_connect($Host, $User, $Password); } else { ! $this->Link_ID = mysql_pconnect($Host, $User, $Password); } if (!$this->Link_ID) { --- 75,81 ---- if(!$this->PConnect) { ! $this->Link_ID = @mysql_connect($Host, $User, $Password); } else { ! $this->Link_ID = @mysql_pconnect($Host, $User, $Password); } if (!$this->Link_ID) { |
From: Layne W. <lay...@us...> - 2005-02-19 15:19:44
|
Update of /cvsroot/phplib/php-lib-stable/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6334/php Modified Files: ct_sql.inc Log Message: name count column in query, $db->f("count") instead of $db->f(0) Index: ct_sql.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/ct_sql.inc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ct_sql.inc 19 Mar 2002 22:28:58 -0000 1.5 --- ct_sql.inc 19 Feb 2005 15:19:35 -0000 1.6 *************** *** 81,85 **** $id, $name); ! $squery = sprintf("select count(*) from %s where val='%s' and changed='%s' and sid='%s' and name='%s'", $this->database_table, $str, --- 81,85 ---- $id, $name); ! $squery = sprintf("select count(sid) count from %s where val='%s' and changed='%s' and sid='%s' and name='%s'", $this->database_table, $str, *************** *** 109,113 **** if ( $this->db->affected_rows() == 0 && $this->db->query($squery) ! && $this->db->next_record() && $this->db->f(0) == 0 && !$this->db->query($iquery)) { --- 109,113 ---- if ( $this->db->affected_rows() == 0 && $this->db->query($squery) ! && $this->db->next_record() && $this->db->f("count") == 0 && !$this->db->query($iquery)) { |