phplib-commit Mailing List for PHPLIB (Page 8)
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: Richard A. <ric...@us...> - 2001-08-16 05:39:10
|
Update of /cvsroot/phplib/php-lib-stable/php In directory usw-pr-cvs1:/tmp/cvs-serv4461 Modified Files: tree.inc Log Message: A few enhancements to tree.inc: resolve bug ID #450713 - check that the $k var contains something Add minimal session-awareness to make the example in the docs work fix a few undefined variable warnings fix typos, whitespace, escaping '\' chars It works fine for me in PHP3 and PHP4, but may still have a few issues. Index: tree.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/tree.inc,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** tree.inc 2000/04/17 16:40:14 1.1.1.1 --- tree.inc 2001/08/16 05:39:07 1.2 *************** *** 42,50 **** var $prfx=array(); var $sufx=array(); ! var $outp; var $flags; function build_tree () { ! ## Dis function must be overriden by user! ## Result should fill $this->tree ## Perhaps it is easier to use this function in a recursive manner --- 42,50 ---- var $prfx=array(); var $sufx=array(); ! var $outp=""; var $flags; function build_tree () { ! ## This function must be overridden by user! ## Result should fill $this->tree ## Perhaps it is easier to use this function in a recursive manner *************** *** 74,78 **** eval($evalnext); ## First element $i=1; ! while ($k || "0"==$k) { $eval2= $eval . "[\"". ereg_Replace("\"","\\\"",$k) ."\"]"; eval("\$t=gettype($eval2); \$v=$eval2;"); --- 74,78 ---- eval($evalnext); ## First element $i=1; ! while (strlen($k)) { $eval2= $eval . "[\"". ereg_Replace("\"","\\\"",$k) ."\"]"; eval("\$t=gettype($eval2); \$v=$eval2;"); *************** *** 122,125 **** --- 122,127 ---- $index=implode("\"][\"",explode($this->delimiter,$path)); $index = "[\"${index}\"]"; + } else { + $index=""; } return($index); *************** *** 149,153 **** ## Same as path_to_index and path_to_child but only ## working on path ! ## function path_add ($path,$key) { --- 151,155 ---- ## Same as path_to_index and path_to_child but only ## working on path ! ## function path_add ($path,$key) { *************** *** 183,186 **** --- 185,193 ---- # I have made a little example, of how to make a simple # explorer like output + # + # These functions attempt to be session-aware. They + # look for a global variable called $sess and if it + # is set they generate relative URLs containing the + # session ID. function starttree () { *************** *** 192,195 **** --- 199,203 ---- function growtree ($key,$value,$path,$depth,$count,$pcount) { + global $sess; #DEB echo ">>> GROWTREE<BR>"; $this->outp.= "<TT>" . join($this->prfx,""); *************** *** 197,207 **** $this->outp.="^----"; } elseif ($count==$pcount) { ! $this->outp.=" \---"; } else { $this->outp.="O----"; } ! $this->outp.= sprintf("</TT> %s->'<A HREF=\"?val=%s\">%s</A>'". " : '%s' (%s) [%s/%s]<BR>\n", ! $key,URLEncode($value),$value,$path,$depth,$pcount,$count); if ($count > $pcount) { $this->prfx[$depth]="|    "; --- 205,222 ---- $this->outp.="^----"; } elseif ($count==$pcount) { ! $this->outp.=" \\---"; } else { $this->outp.="O----"; } ! if (isset($sess)) { ! $query_string = $sess->url($GLOBALS["PHP_SELF"]); ! $query_string .= $sess->mode == "get" ? "&" : "?"; ! $query_string .= "val=" . urlencode($value); ! } else { ! $query_string = $GLOBALS["PHP_SELF"] . "?val=" . urlencode($value); ! } ! $this->outp.= sprintf("</TT> %s->'<A HREF=\"%s\">%s</A>'". " : '%s' (%s) [%s/%s]<BR>\n", ! $key,$query_string,$value,$path,$depth,$pcount,$count); if ($count > $pcount) { $this->prfx[$depth]="|    "; *************** *** 213,216 **** --- 228,232 ---- function leaftree ($key,$value,$path,$depth,$count,$pcount) { + global $sess; #DEB echo "--- LEAFTREE<BR>"; $this->outp.= "<TT>" . join($this->prfx,""); *************** *** 218,228 **** $this->outp.="*----"; } elseif ($count==$pcount) { ! $this->outp.=" \---"; } else { $this->outp.="+----"; } ! $this->outp.= sprintf("</TT> %s->'<A HREF=\"?val=%s\">%s</A>'". " : '%s' (%s) [%s/%s]<BR>\n", ! $key,URLEncode($value),$value,$path,$depth,$pcount,$count); $this->flag=false; } --- 234,251 ---- $this->outp.="*----"; } elseif ($count==$pcount) { ! $this->outp.=" \\---"; } else { $this->outp.="+----"; } ! if (isset($sess)) { ! $query_string = $sess->url($GLOBALS["PHP_SELF"]); ! $query_string .= $sess->mode == "get" ? "&" : "?"; ! $query_string .= "val=" . urlencode($value); ! } else { ! $query_string = $GLOBALS["PHP_SELF"] . "?val=" . urlencode($value); ! } ! $this->outp.= sprintf("</TT> %s->'<A HREF=\"%s\">%s</A>'". " : '%s' (%s) [%s/%s]<BR>\n", ! $key,$query_string,$value,$path,$depth,$pcount,$count); $this->flag=false; } |
From: Richard A. <ric...@us...> - 2001-08-16 05:04:25
|
Update of /cvsroot/phplib/php-lib/doc/sgml In directory usw-pr-cvs1:/tmp/cvs-serv32668 Modified Files: 05-tree.sgml Log Message: Bring into sync with -stable Fix up the directory tree example: enable sessions so the array is persistent PHP3 and PHP4 compatible undeclared variable warnings And clean up whitespace in the SGML code. Index: 05-tree.sgml =================================================================== RCS file: /cvsroot/phplib/php-lib/doc/sgml/05-tree.sgml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 05-tree.sgml 1999/07/16 21:45:40 1.1 --- 05-tree.sgml 2001/08/16 05:04:22 1.2 *************** *** 2,12 **** <sect1>Tree ! <p> ! The Tree class can render tree structures such as directory hierarchies and menu structures as HTML. The structure must be given to Tree as an nested array of arrays of arbitrary depth. - <p> - The idea of Tree is, that there are several mathematical models a tree could be viewed: One model is a data structure like nested arrays or a pointer --- 2,10 ---- <sect1>Tree ! ! <p>The Tree class can render tree structures such as directory hierarchies and menu structures as HTML. The structure must be given to Tree as an nested array of arrays of arbitrary depth. The idea of Tree is, that there are several mathematical models a tree could be viewed: One model is a data structure like nested arrays or a pointer *************** *** 17,22 **** sense). - <p> - To generate HTML-code from a tree-structure it is like this: You need at the end a one-dimensional string, which tells the browser what to do. The --- 15,18 ---- *************** *** 26,33 **** be generated. - <sect2>Instance variables <p> - <table> <tabular ca=""> --- 22,27 ---- *************** *** 42,50 **** <sect2>Instance methods - <p> <sect3>Accessible instance methods <p> - <descrip> <tag>build_tree()</tag> --- 36,42 ---- *************** *** 57,62 **** <tag>go_trough_tree($key="",$path="",$depth=0,$lcount=0,$pcount=0)</tag> - <p> This is the most important function of this class. It will call the output functions in the right order with the correct parameters. --- 49,54 ---- <tag>go_trough_tree($key="",$path="",$depth=0,$lcount=0,$pcount=0)</tag> + <p> This is the most important function of this class. It will call the output functions in the right order with the correct parameters. *************** *** 66,71 **** <tag>path_to_index (&$path,$key="")</tag> ! <P> ! This function is mostly used internally, but could be useful for you to generate <tt/$this->tree/. This function generates a PHP3 associate array-index string from a path, which is also --- 58,63 ---- <tag>path_to_index (&$path,$key="")</tag> ! ! <p>This function is mostly used internally, but could be useful for you to generate <tt/$this->tree/. This function generates a PHP3 associate array-index string from a path, which is also *************** *** 122,127 **** associate key to the tree described by path. - - <tag>starttree ()</tag> <p> --- 114,117 ---- *************** *** 159,163 **** Called when leaving tree. - </descrip> --- 149,152 ---- *************** *** 191,198 **** </code></tscreen> This is a completely recursive structure and I think, it is clear, how to create it with a recursive call of a function. If not, see the example below. - <p> One little quirk has to be explained, because it is a little --- 180,187 ---- </code></tscreen> + <p> This is a completely recursive structure and I think, it is clear, how to create it with a recursive call of a function. If not, see the example below. One little quirk has to be explained, because it is a little *************** *** 204,208 **** "Array" (perhaps something that should be changed). - <P> The output of this example if you don't change the output-functions will look like this: --- 193,196 ---- *************** *** 237,247 **** <sect2>Example <p> ! ! My example is just going trough the directory structure of your hard disk. <p> - The following code could read it: - <tscreen><code> class dir_Tree extends Tree { var $classname = "dir_Tree"; --- 225,246 ---- <sect2>Example <p> ! This example recursively reads in the directory structure of your hard disk. ! It allows you to flap in and out whole subdirectory trees. ! The $flap_out array must be persistent, so we use sessions and ! register it as a session variable. <p> <tscreen><code> + <? + // Uncomment these includes if necessary + // include("prepend.php3"); + // include "tree.inc"; + + // Session handling straight out of the demo + page_open(array("sess" => "Example_Session")); + + if (!isset($flap_out)) { $flap_out=array(); }; + $sess->register("flap_out"); + class dir_Tree extends Tree { var $classname = "dir_Tree"; *************** *** 251,255 **** function build_tree ($path=".") { ! $this->tree=$this->recurs_dir($path,0); } --- 250,254 ---- function build_tree ($path=".") { ! $this->tree=$this->recurs_dir($path,0); } *************** *** 264,273 **** while ( $name=readdir($d) ) { ! $pathname=$path . $this->delimiter . $name; ! if (is_dir($pathname) && !ereg("\.\.?",$pathname)) { if (isset($flap_out[$pathname])) { ! $array[$name]=$this->recurs_dir($pathname,$depth+1); } ! # ATTENTION: It is IMPORTANT fill the [0] array # *after* filling the rest of the array! $array[$name][0]=$pathname; --- 263,272 ---- while ( $name=readdir($d) ) { ! $pathname=$path . $this->delimiter . $name; ! if (is_dir($pathname) && !ereg("\\.\\.?",$pathname)) { if (isset($flap_out[$pathname])) { ! $array[$name]=$this->recurs_dir($pathname,$depth+1); } ! # ATTENTION: It is IMPORTANT fill the [0] array # *after* filling the rest of the array! $array[$name][0]=$pathname; *************** *** 284,298 **** ## FLAPPING IN and OUT ## This is used to create an array which includes ! ## all sub-paths which should be showed ! ## function flapping ($path) { ! GLOBAL $flap_out; if ($path) { ! if (is_dir($path)) { ! if (isset($flap_out[$path])) { ! unset($flap_out[$path]); } else { ! $flap_out[$path]=$name; } } --- 283,297 ---- ## FLAPPING IN and OUT ## This is used to create an array which includes ! ## all sub-paths which should be shown ! ## function flapping ($path) { ! GLOBAL $flap_out; if ($path) { ! if (is_dir($path)) { ! if (isset($flap_out[$path])) { ! unset($flap_out[$path]); } else { ! $flap_out[$path]=""; } } *************** *** 302,309 **** $t= new dir_Tree; ! $t->flapping($val); ## $val is given by GET-method, see *tree()-functions ! $t->build_tree(); ! $t->go_through_tree(); ! print $t->outp; </code></tscreen> --- 301,312 ---- $t= new dir_Tree; ! $t->flapping($val); ## $val is given by GET-method, see *tree()-functions ! $t->build_tree(); ! $t->go_through_tree(); ! print $t->outp; ! ! page_close() ! ! ?> </code></tscreen> *************** *** 320,332 **** <tt/$delimiter/-string. This cannot be solved correctly and you have to look for it when you create the tree. ! <P> The same thing is with the value [0] (zero) of a sub-array. This element is always used as the attribute of the parent element. ! <P> A good tip: when you build your tree recursively then the [0]-index must be filled <em/after/ the subtree is returned from recursive call. See in the example above what I mean. I think it's a PHP3 specialty. ! <P> Also it is possible that not every name could be inserted into the associate index-field (Control-chars etc.), but this is untested. --- 323,335 ---- <tt/$delimiter/-string. This cannot be solved correctly and you have to look for it when you create the tree. ! The same thing is with the value [0] (zero) of a sub-array. This element is always used as the attribute of the parent element. ! A good tip: when you build your tree recursively then the [0]-index must be filled <em/after/ the subtree is returned from recursive call. See in the example above what I mean. I think it's a PHP3 specialty. ! Also it is possible that not every name could be inserted into the associate index-field (Control-chars etc.), but this is untested. |
From: Richard A. <ric...@us...> - 2001-08-16 05:01:41
|
Update of /cvsroot/phplib/php-lib-stable/doc/sgml In directory usw-pr-cvs1:/tmp/cvs-serv31805 Modified Files: 05-tree.sgml Log Message: Fix up the directory tree example: enable sessions so the array is persistent PHP3 and PHP4 compatible undeclared variable warnings And clean up whitespace in the SGML code. Index: 05-tree.sgml =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/doc/sgml/05-tree.sgml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** 05-tree.sgml 2000/04/17 16:40:06 1.1.1.1 --- 05-tree.sgml 2001/08/16 05:01:38 1.2 *************** *** 2,12 **** <sect1>Tree ! <p> ! The Tree class can render tree structures such as directory hierarchies and menu structures as HTML. The structure must be given to Tree as an nested array of arrays of arbitrary depth. - <p> - The idea of Tree is, that there are several mathematical models a tree could be viewed: One model is a data structure like nested arrays or a pointer --- 2,10 ---- <sect1>Tree ! ! <p>The Tree class can render tree structures such as directory hierarchies and menu structures as HTML. The structure must be given to Tree as an nested array of arrays of arbitrary depth. The idea of Tree is, that there are several mathematical models a tree could be viewed: One model is a data structure like nested arrays or a pointer *************** *** 17,22 **** sense). - <p> - To generate HTML-code from a tree-structure it is like this: You need at the end a one-dimensional string, which tells the browser what to do. The --- 15,18 ---- *************** *** 26,33 **** be generated. - <sect2>Instance variables <p> - <table> <tabular ca=""> --- 22,27 ---- *************** *** 42,50 **** <sect2>Instance methods - <p> <sect3>Accessible instance methods <p> - <descrip> <tag>build_tree()</tag> --- 36,42 ---- *************** *** 57,62 **** <tag>go_trough_tree($key="",$path="",$depth=0,$lcount=0,$pcount=0)</tag> - <p> This is the most important function of this class. It will call the output functions in the right order with the correct parameters. --- 49,54 ---- <tag>go_trough_tree($key="",$path="",$depth=0,$lcount=0,$pcount=0)</tag> + <p> This is the most important function of this class. It will call the output functions in the right order with the correct parameters. *************** *** 66,71 **** <tag>path_to_index (&$path,$key="")</tag> ! <P> ! This function is mostly used internally, but could be useful for you to generate <tt/$this->tree/. This function generates a PHP3 associate array-index string from a path, which is also --- 58,63 ---- <tag>path_to_index (&$path,$key="")</tag> ! ! <p>This function is mostly used internally, but could be useful for you to generate <tt/$this->tree/. This function generates a PHP3 associate array-index string from a path, which is also *************** *** 122,127 **** associate key to the tree described by path. - - <tag>starttree ()</tag> <p> --- 114,117 ---- *************** *** 159,163 **** Called when leaving tree. - </descrip> --- 149,152 ---- *************** *** 191,198 **** </code></tscreen> This is a completely recursive structure and I think, it is clear, how to create it with a recursive call of a function. If not, see the example below. - <p> One little quirk has to be explained, because it is a little --- 180,187 ---- </code></tscreen> + <p> This is a completely recursive structure and I think, it is clear, how to create it with a recursive call of a function. If not, see the example below. One little quirk has to be explained, because it is a little *************** *** 204,208 **** "Array" (perhaps something that should be changed). - <P> The output of this example if you don't change the output-functions will look like this: --- 193,196 ---- *************** *** 237,247 **** <sect2>Example <p> ! ! My example is just going trough the directory structure of your hard disk. <p> - The following code could read it: - <tscreen><code> class dir_Tree extends Tree { var $classname = "dir_Tree"; --- 225,246 ---- <sect2>Example <p> ! This example recursively reads in the directory structure of your hard disk. ! It allows you to flap in and out whole subdirectory trees. ! The $flap_out array must be persistent, so we use sessions and ! register it as a session variable. <p> <tscreen><code> + <? + // Uncomment these includes if necessary + // include("prepend.php3"); + // include "tree.inc"; + + // Session handling straight out of the demo + page_open(array("sess" => "Example_Session")); + + if (!isset($flap_out)) { $flap_out=array(); }; + $sess->register("flap_out"); + class dir_Tree extends Tree { var $classname = "dir_Tree"; *************** *** 251,255 **** function build_tree ($path=".") { ! $this->tree=$this->recurs_dir($path,0); } --- 250,254 ---- function build_tree ($path=".") { ! $this->tree=$this->recurs_dir($path,0); } *************** *** 264,273 **** while ( $name=readdir($d) ) { ! $pathname=$path . $this->delimiter . $name; ! if (is_dir($pathname) && !ereg("\.\.?",$pathname)) { if (isset($flap_out[$pathname])) { ! $array[$name]=$this->recurs_dir($pathname,$depth+1); } ! # ATTENTION: It is IMPORTANT fill the [0] array # *after* filling the rest of the array! $array[$name][0]=$pathname; --- 263,272 ---- while ( $name=readdir($d) ) { ! $pathname=$path . $this->delimiter . $name; ! if (is_dir($pathname) && !ereg("\\.\\.?",$pathname)) { if (isset($flap_out[$pathname])) { ! $array[$name]=$this->recurs_dir($pathname,$depth+1); } ! # ATTENTION: It is IMPORTANT fill the [0] array # *after* filling the rest of the array! $array[$name][0]=$pathname; *************** *** 284,298 **** ## FLAPPING IN and OUT ## This is used to create an array which includes ! ## all sub-paths which should be showed ! ## function flapping ($path) { ! GLOBAL $flap_out; if ($path) { ! if (is_dir($path)) { ! if (isset($flap_out[$path])) { ! unset($flap_out[$path]); } else { ! $flap_out[$path]=$name; } } --- 283,297 ---- ## FLAPPING IN and OUT ## This is used to create an array which includes ! ## all sub-paths which should be shown ! ## function flapping ($path) { ! GLOBAL $flap_out; if ($path) { ! if (is_dir($path)) { ! if (isset($flap_out[$path])) { ! unset($flap_out[$path]); } else { ! $flap_out[$path]=""; } } *************** *** 302,309 **** $t= new dir_Tree; ! $t->flapping($val); ## $val is given by GET-method, see *tree()-functions ! $t->build_tree(); ! $t->go_through_tree(); ! print $t->outp; </code></tscreen> --- 301,312 ---- $t= new dir_Tree; ! $t->flapping($val); ## $val is given by GET-method, see *tree()-functions ! $t->build_tree(); ! $t->go_through_tree(); ! print $t->outp; ! ! page_close() ! ! ?> </code></tscreen> *************** *** 320,332 **** <tt/$delimiter/-string. This cannot be solved correctly and you have to look for it when you create the tree. ! <P> The same thing is with the value [0] (zero) of a sub-array. This element is always used as the attribute of the parent element. ! <P> A good tip: when you build your tree recursively then the [0]-index must be filled <em/after/ the subtree is returned from recursive call. See in the example above what I mean. I think it's a PHP3 specialty. ! <P> Also it is possible that not every name could be inserted into the associate index-field (Control-chars etc.), but this is untested. --- 323,335 ---- <tt/$delimiter/-string. This cannot be solved correctly and you have to look for it when you create the tree. ! The same thing is with the value [0] (zero) of a sub-array. This element is always used as the attribute of the parent element. ! A good tip: when you build your tree recursively then the [0]-index must be filled <em/after/ the subtree is returned from recursive call. See in the example above what I mean. I think it's a PHP3 specialty. ! Also it is possible that not every name could be inserted into the associate index-field (Control-chars etc.), but this is untested. |
From: Richard A. <ric...@us...> - 2001-08-15 22:38:03
|
Update of /cvsroot/phplib/php-lib-stable/doc/sgml In directory usw-pr-cvs1:/tmp/cvs-serv6282 Modified Files: 05-tpl_form.sgml Log Message: fix broken table layout Index: 05-tpl_form.sgml =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/doc/sgml/05-tpl_form.sgml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** 05-tpl_form.sgml 2000/04/17 16:40:06 1.1.1.1 --- 05-tpl_form.sgml 2001/08/15 22:37:59 1.2 *************** *** 47,51 **** Name of the class. Used for serialization AND in <tt/display/ to determine the filename of template containing HTML/php code needed to actually render the form.<rowsep> error<colsep> ! Contains error messages generated by <tt/validate/ and <tt/validate_input/ methods. values<colsep> This is a sort of "shared memory area" between the form and the application. Is read in <tt/init/ method and passed back in <tt/get_values/ method.<rowsep> --- 47,51 ---- Name of the class. Used for serialization AND in <tt/display/ to determine the filename of template containing HTML/php code needed to actually render the form.<rowsep> error<colsep> ! Contains error messages generated by <tt/validate/ and <tt/validate_input/ methods.<rowsep> values<colsep> This is a sort of "shared memory area" between the form and the application. Is read in <tt/init/ method and passed back in <tt/get_values/ method.<rowsep> |
From: Richard A. <ric...@us...> - 2001-08-15 22:29:17
|
Update of /cvsroot/phplib/php-lib-stable/php In directory usw-pr-cvs1:/tmp/cvs-serv5942 Modified Files: local.inc Log Message: add a missing $_PHPLIB["libdir"] prefix Index: local.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/local.inc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** local.inc 2001/02/02 21:19:14 1.5 --- local.inc 2001/08/15 22:29:15 1.6 *************** *** 192,196 **** $sess->register("challenge"); ! include("crcloginform.ihtml"); } --- 192,196 ---- $sess->register("challenge"); ! include($_PHPLIB["libdir"] . "crcloginform.ihtml"); } |
From: Richard A. <ric...@us...> - 2001-08-15 08:34:45
|
Update of /cvsroot/phplib/php-lib-stable/pages/admin In directory usw-pr-cvs1:/tmp/cvs-serv15188 Modified Files: new_user.php3 new_user_md5.php3 Log Message: Fixed a possible warning thrown by implode if $perms was empty. Fixed a bunch of errors in new_user_md5.php3. Index: new_user.php3 =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/pages/admin/new_user.php3,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** new_user.php3 2000/07/12 18:22:32 1.2 --- new_user.php3 2001/08/15 08:34:43 1.3 *************** *** 108,111 **** --- 108,117 ---- $db = new DB_Example; + ## $perms array will be unset if a user has had all perms removed. + ## If so, set $perms to an empty array to prevent errors from implode. + if (empty($perms)) { + $perms = array(); + } + // Check if there was a submission while (is_array($HTTP_POST_VARS) Index: new_user_md5.php3 =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/pages/admin/new_user_md5.php3,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** new_user_md5.php3 2000/04/17 16:40:08 1.1.1.1 --- new_user_md5.php3 2001/08/15 08:34:43 1.2 *************** *** 82,88 **** <head> <!-- ! // here i include my personal meta-tags; one of those might be useful: ! // <META HTTP-EQUIV="REFRESH" CONTENT="<?php print $auth->lifetime*60;?>; URL=logoff.html"> ! // <?php include($_PHPLIB["libdir"] . "meta.inc");?> --> <title>User Admin</title> --- 82,86 ---- <head> <!-- ! <META HTTP-EQUIV="REFRESH" CONTENT="<?php print $auth->lifetime*60;?>; URL=logoff.html"> --> <title>User Admin</title> *************** *** 94,102 **** --> </style> ! <script language="javascript" src="/session/md5.js"></script> </head> <body bgcolor="#ffffff"> <h1>User Administration</h1> <?php --- 92,106 ---- --> </style> ! <script language="javascript" src="../md5.js"></script> </head> <body bgcolor="#ffffff"> <h1>User Administration</h1> + <P> + You are logged in as <b><?php print $auth->auth["uname"] ?></b> + with admin level <b><?php print $auth->auth["perm"] ?></b>.<BR> + Your authentication is valid until + <?php print date("d M Y, H:i:s", $auth->auth["exp"])?>. + </P> <?php *************** *** 119,122 **** --- 123,132 ---- } + ## $perms array will be unset if a user has had all perms removed. + ## If so, set $perms to an empty array to prevent errors from implode. + if (empty($perms)) { + $perms = array(); + } + ## Check if there was a submission while ( is_array($HTTP_POST_VARS) *************** *** 149,153 **** ## Create a uid and insert the user... $u_id=md5(uniqid($hash_secret)); ! $query = "insert into auth_user_md5 values('$u_id','$username','$password','$perms')"; $db->query($query); if ($db->affected_rows() == 0) { --- 159,164 ---- ## Create a uid and insert the user... $u_id=md5(uniqid($hash_secret)); ! $permlist = addslashes(implode($perms,",")); ! $query = "insert into auth_user_md5 values('$u_id','$username','$password','$permlist')"; $db->query($query); if ($db->affected_rows() == 0) { *************** *** 169,173 **** ## Handle users changing their own password... if (!$perm->have_perm("admin")) { ! $query = "update auth_user_md5 set password='$password' where uid='$u_id'"; $db->query($query); if ($db->affected_rows() == 0) { --- 180,184 ---- ## Handle users changing their own password... if (!$perm->have_perm("admin")) { ! $query = "update auth_user_md5 set password='$password' where user_id='$u_id'"; $db->query($query); if ($db->affected_rows() == 0) { *************** *** 187,191 **** ## Update user information. ! $query = "update auth_user_md5 set username='$username', password='$password', perms='$perms' where uid='$u_id'"; $db->query($query); if ($db->affected_rows() == 0) { --- 198,203 ---- ## Update user information. ! $permlist = addslashes(implode($perms,",")); ! $query = "update auth_user_md5 set username='$username', password='$password', perms='$permlist' where user_id='$u_id'"; $db->query($query); if ($db->affected_rows() == 0) { *************** *** 206,210 **** ## Delete that user. ! $query = "delete from auth_user_md5 where uid='$u_id' and username='$username'"; $db->query($query); if ($db->affected_rows() == 0) { --- 218,222 ---- ## Delete that user. ! $query = "delete from auth_user_md5 where user_id='$u_id' and username='$username'"; $db->query($query); if ($db->affected_rows() == 0) { *************** *** 289,293 **** <td align=right> ! <input type="hidden" name="u_id" value="<?php $db->p("uid") ?>"> <input type="submit" name="u_kill" value="Kill"> <input onClick="doEditUser(); return true;" type="submit" name="u_edit" value="Change"> --- 301,305 ---- <td align=right> ! <input type="hidden" name="u_id" value="<?php $db->p("user_id") ?>"> <input type="submit" name="u_kill" value="Kill"> <input onClick="doEditUser(); return true;" type="submit" name="u_edit" value="Change"> *************** *** 300,304 **** <td><?php $db->p("perms") ?></td> <td align=right> ! <input type="hidden" name="u_id" value="<?php $db->p("uid") ?>"> <input onClick="doEditUser(); return true;" type="submit" name="u_edit" value="Change"> </td> --- 312,316 ---- <td><?php $db->p("perms") ?></td> <td align=right> ! <input type="hidden" name="u_id" value="<?php $db->p("user_id") ?>"> <input onClick="doEditUser(); return true;" type="submit" name="u_edit" value="Change"> </td> |
From: Richard A. <ric...@us...> - 2001-08-15 08:23:07
|
Update of /cvsroot/phplib/php-lib/pages/admin In directory usw-pr-cvs1:/tmp/cvs-serv12904 Modified Files: new_user.php3 new_user_md5.php3 Log Message: Fixed a possible warning thrown by implode in new_user.php3. Brought new_user_md5.php3 into sync with the -stable version. Index: new_user.php3 =================================================================== RCS file: /cvsroot/phplib/php-lib/pages/admin/new_user.php3,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** new_user.php3 2000/01/17 16:16:16 1.11 --- new_user.php3 2001/08/15 08:23:04 1.12 *************** *** 108,111 **** --- 108,117 ---- $db = new DB_Example; + ## $perms array will be unset if a user has had all perms removed. + ## If so, set $perms to an empty array to prevent errors from implode. + if (empty($perms)) { + $perms = array(); + } + // Check if there was a submission while (is_array($HTTP_POST_VARS) Index: new_user_md5.php3 =================================================================== RCS file: /cvsroot/phplib/php-lib/pages/admin/new_user_md5.php3,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** new_user_md5.php3 2000/01/17 16:16:16 1.6 --- new_user_md5.php3 2001/08/15 08:23:04 1.7 *************** *** 82,88 **** <head> <!-- ! // here i include my personal meta-tags; one of those might be useful: ! // <META HTTP-EQUIV="REFRESH" CONTENT="<?php print $auth->lifetime*60;?>; URL=logoff.html"> ! // <?php include($_PHPLIB["libdir"] . "meta.inc");?> --> <title>User Admin</title> --- 82,86 ---- <head> <!-- ! <META HTTP-EQUIV="REFRESH" CONTENT="<?php print $auth->lifetime*60;?>; URL=logoff.html"> --> <title>User Admin</title> *************** *** 94,102 **** --> </style> ! <script language="javascript" src="/session/md5.js"></script> </head> <body bgcolor="#ffffff"> <h1>User Administration</h1> <?php --- 92,106 ---- --> </style> ! <script language="javascript" src="../md5.js"></script> </head> <body bgcolor="#ffffff"> <h1>User Administration</h1> + <P> + You are logged in as <b><?php print $auth->auth["uname"] ?></b> + with admin level <b><?php print $auth->auth["perm"] ?></b>.<BR> + Your authentication is valid until + <?php print date("d M Y, H:i:s", $auth->auth["exp"])?>. + </P> <?php *************** *** 119,122 **** --- 123,132 ---- } + ## $perms array will be unset if a user has had all perms removed. + ## If so, set $perms to an empty array to prevent errors from implode. + if (empty($perms)) { + $perms = array(); + } + ## Check if there was a submission while ( is_array($HTTP_POST_VARS) *************** *** 149,155 **** ## Create a uid and insert the user... $u_id=md5(uniqid($hash_secret)); ! ## Fish out actual permissions from an array shipped in by PHP ! $realperms=implode(',',$perms); ! $query = "insert into auth_user_md5 values('$u_id','$username','$password','$realperms')"; $db->query($query); if ($db->affected_rows() == 0) { --- 159,164 ---- ## Create a uid and insert the user... $u_id=md5(uniqid($hash_secret)); ! $permlist = addslashes(implode($perms,",")); ! $query = "insert into auth_user_md5 values('$u_id','$username','$password','$permlist')"; $db->query($query); if ($db->affected_rows() == 0) { *************** *** 189,195 **** ## Update user information. ! ## Get permissions from the array ! $realperms=implode(',',$perms); ! $query = "update auth_user_md5 set p_username='$username', p_password='$password', p_perms='$realperms' where p_user_id='$u_id'"; $db->query($query); if ($db->affected_rows() == 0) { --- 198,203 ---- ## Update user information. ! $permlist = addslashes(implode($perms,",")); ! $query = "update auth_user_md5 set p_username='$username', p_password='$password', p_perms='$permlist' where p_user_id='$u_id'"; $db->query($query); if ($db->affected_rows() == 0) { |
From: Richard A. <ric...@us...> - 2001-08-13 23:12:04
|
Update of /cvsroot/phplib/php-lib-stable/php In directory usw-pr-cvs1:/tmp/cvs-serv29593 Modified Files: db_mysql.inc Log Message: Fix error reporting problems. Bug IDs: #445393, #450358, #450359. Index: db_mysql.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/db_mysql.inc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** db_mysql.inc 2001/08/13 22:54:33 1.5 --- db_mysql.inc 2001/08/13 23:12:01 1.6 *************** *** 78,82 **** if (!@mysql_select_db($Database,$this->Link_ID)) { ! $this->halt("cannot use database ".$this->Database); return 0; } --- 78,82 ---- if (!@mysql_select_db($Database,$this->Link_ID)) { ! $this->halt("cannot use database ".$Database); return 0; } *************** *** 184,188 **** $res = @mysql_query($query, $this->Link_ID); if (!$res) { ! $this->halt("lock($table, $mode) failed."); return 0; } --- 184,188 ---- $res = @mysql_query($query, $this->Link_ID); if (!$res) { ! $this->halt("lock() failed."); return 0; } *************** *** 310,319 **** $this->connect(); $id = @mysql_list_fields($this->Database, $table); ! if (!$id) $this->halt("Metadata query failed."); } else { $id = $this->Query_ID; ! if (!$id) $this->halt("No query specified."); } --- 310,323 ---- $this->connect(); $id = @mysql_list_fields($this->Database, $table); ! if (!$id) { $this->halt("Metadata query failed."); + return false; + } } else { $id = $this->Query_ID; ! if (!$id) { $this->halt("No query specified."); + return false; + } } |
From: Richard A. <ric...@us...> - 2001-08-13 23:07:45
|
Update of /cvsroot/phplib/php-lib/php/db/mysql In directory usw-pr-cvs1:/tmp/cvs-serv28878 Modified Files: db_sql.inc Log Message: Change error reporting in lock(). Bug ID #445393 Index: db_sql.inc =================================================================== RCS file: /cvsroot/phplib/php-lib/php/db/mysql/db_sql.inc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** db_sql.inc 2001/08/12 23:23:20 1.4 --- db_sql.inc 2001/08/13 23:07:42 1.5 *************** *** 148,152 **** $res = @mysql_query($query, $this->Link_ID); if (!$res) { ! $this->halt("lock($table, $mode) failed."); return 0; } --- 148,152 ---- $res = @mysql_query($query, $this->Link_ID); if (!$res) { ! $this->halt("lock() failed."); return 0; } |
From: Richard A. <ric...@us...> - 2001-08-13 22:54:36
|
Update of /cvsroot/phplib/php-lib-stable/php In directory usw-pr-cvs1:/tmp/cvs-serv25231 Modified Files: db_mysql.inc Log Message: Fix call to $this->num_rows() in seek(). Bug ID #445391. Index: db_mysql.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/db_mysql.inc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** db_mysql.inc 2001/08/12 05:24:44 1.4 --- db_mysql.inc 2001/08/13 22:54:33 1.5 *************** *** 158,162 **** */ @mysql_data_seek($this->Query_ID, $this->num_rows()); ! $this->Row = $this->num_rows; return 0; } --- 158,162 ---- */ @mysql_data_seek($this->Query_ID, $this->num_rows()); ! $this->Row = $this->num_rows(); return 0; } |
Update of /cvsroot/phplib/php-lib/pages/form In directory usw-pr-cvs1:/tmp/cvs-serv25334/form Removed Files: assistant.php3 example_form.inc example_template_bridge.inc flow_layout.php4 form_elements_template.html template_bridge_dump.php3 Log Message: removed some more example files - new home is PEAR --- assistant.php3 DELETED --- --- example_form.inc DELETED --- --- example_template_bridge.inc DELETED --- --- flow_layout.php4 DELETED --- --- form_elements_template.html DELETED --- --- template_bridge_dump.php3 DELETED --- |
From: Ulf W. <ulf...@us...> - 2001-08-13 19:04:02
|
Update of /cvsroot/phplib/php-lib/php/ext In directory usw-pr-cvs1:/tmp/cvs-serv24366 Removed Files: integratedtemplate.inc integratedtemplateextension.inc Log Message: This is also already part of PEAR. --- integratedtemplate.inc DELETED --- --- integratedtemplateextension.inc DELETED --- |
From: Ulf W. <ulf...@us...> - 2001-08-13 18:54:13
|
Update of /cvsroot/phplib/php-lib/pages/form In directory usw-pr-cvs1:/tmp/cvs-serv21515 Removed Files: README example_assistant.inc example_flow_layout.inc index.php4 Log Message: I've checked in the ooh form rewrite to PEAR - starting to remove it from this repository. --- README DELETED --- --- example_assistant.inc DELETED --- --- example_flow_layout.inc DELETED --- --- index.php4 DELETED --- |
From: Richard A. <ric...@us...> - 2001-08-13 12:40:21
|
Update of /cvsroot/phplib/php-lib/doc/sgml In directory usw-pr-cvs1:/tmp/cvs-serv20539 Modified Files: .cvsignore Log Message: remove documentation.sgml from .cvsignore Index: .cvsignore =================================================================== RCS file: /cvsroot/phplib/php-lib/doc/sgml/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 1999/02/07 00:53:44 1.1 --- .cvsignore 2001/08/13 12:40:18 1.2 *************** *** 1 **** ! documentation.sgml --- 1 ---- ! |
From: Richard A. <ric...@us...> - 2001-08-13 12:30:08
|
Update of /cvsroot/phplib/php-lib-stable/doc/sgml In directory usw-pr-cvs1:/tmp/cvs-serv19803/doc/sgml Modified Files: .cvsignore 01-insttest.sgml 02-download.sgml 02-mod_php.sgml 02-procedure.sgml 03-auth.sgml 03-ct_file.sgml 03-db_sql.sgml Added Files: documentation.sgml Log Message: Remove references to NetUSE from docs and HELP. --- NEW FILE: documentation.sgml --- <!doctype linuxdoc system [ <!ENTITY f01quickstart SYSTEM "01-quickstart.sgml"> <!ENTITY f01license SYSTEM "01-license.sgml"> <!ENTITY f01prereq SYSTEM "01-prereq.sgml"> <!ENTITY f01qinstgui SYSTEM "01-qinstgui.sgml"> <!ENTITY f01usingcore SYSTEM "01-usingcore.sgml"> <!ENTITY f01insttest SYSTEM "01-insttest.sgml"> <!ENTITY f02installation SYSTEM "02-installation.sgml"> <!ENTITY f02files SYSTEM "02-files.sgml"> <!ENTITY f02download SYSTEM "02-download.sgml"> <!ENTITY f02requirements SYSTEM "02-requirements.sgml"> <!ENTITY f02procedure SYSTEM "02-procedure.sgml"> <!ENTITY f02include SYSTEM "02-include.sgml"> <!ENTITY f02modphp SYSTEM "02-mod_php.sgml"> <!ENTITY f03core SYSTEM "03-core.sgml"> <!ENTITY f03dbsql SYSTEM "03-db_sql.sgml"> <!ENTITY f03page SYSTEM "03-page.sgml"> <!ENTITY f03ctsql SYSTEM "03-ct_sql.sgml"> <!ENTITY f03ctsplitsql SYSTEM "03-ct_split_sql.sgml"> <!ENTITY f03ctshm SYSTEM "03-ct_shm.sgml"> <!ENTITY f03ctdbm SYSTEM "03-ct_dbm.sgml"> <!ENTITY f03ctfile SYSTEM "03-ct_file.sgml"> <!ENTITY f03ctldap SYSTEM "03-ct_ldap.sgml"> <!ENTITY f03session SYSTEM "03-session.sgml"> <!ENTITY f03auth SYSTEM "03-auth.sgml"> <!ENTITY f03perm SYSTEM "03-perm.sgml"> <!ENTITY f03user SYSTEM "03-user.sgml"> <!ENTITY f04extended SYSTEM "04-extended.sgml"> <!ENTITY f04cart SYSTEM "04-cart.sgml"> <!ENTITY f04template SYSTEM "04-template.sgml"> <!ENTITY f05widget SYSTEM "05-widget.sgml"> <!ENTITY f05sqlquery SYSTEM "05-sql_query.sgml"> <!ENTITY f05table SYSTEM "05-table.sgml"> <!ENTITY f05menu SYSTEM "05-menu.sgml"> <!ENTITY f05form SYSTEM "05-form.sgml"> <!ENTITY f05tplform SYSTEM "05-tpl_form.sgml"> <!ENTITY f05tree SYSTEM "05-tree.sgml"> <!ENTITY f05strings2 SYSTEM "05-strings2.sgml"> <!ENTITY f06ack SYSTEM "06-ack.sgml"> ]> <!-- $Id: documentation.sgml,v 1.1 2001/08/13 12:30:06 richardarcher Exp $ --> <article> <title>PHP Base Library Documentation, Release phplib_7_2 <author>Boris Erdmann, bo...@er..., Kristian Koehntopp, kk...@ne... and Sascha Schumann, sa...@sc... <date>$Id: documentation.sgml,v 1.1 2001/08/13 12:30:06 richardarcher Exp $ <toc> &f01quickstart; &f01license; &f01prereq; &f01qinstgui; &f01usingcore; &f01insttest; &f02installation; &f02files; &f02download; &f02requirements; &f02procedure; &f02include; &f02modphp; &f03core; &f03dbsql; &f03page; &f03ctsql; &f03ctsplitsql; &f03ctshm; &f03ctdbm; &f03ctldap; &f03session; &f03auth; &f03perm; &f03user; &f04extended; &f04cart; &f04template; &f05widget; &f05sqlquery; &f05table; &f05menu; &f05form; &f05tplform; &f05tree; &f05strings2; &f06ack; </article> Index: .cvsignore =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/doc/sgml/.cvsignore,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** .cvsignore 2000/04/17 16:39:57 1.1.1.1 --- .cvsignore 2001/08/13 12:30:05 1.2 *************** *** 1 **** ! documentation.sgml --- 1 ---- ! Index: 01-insttest.sgml =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/doc/sgml/01-insttest.sgml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** 01-insttest.sgml 2000/04/17 16:39:58 1.1.1.1 --- 01-insttest.sgml 2001/08/13 12:30:05 1.2 *************** *** 10,15 **** We do have a support mailing list available under the address ! <tt/ph...@li.../. To subscribe to the list, send the command ! <tt/subscribe/ to the address <tt/php...@li.../. <descrip> --- 10,16 ---- We do have a support mailing list available under the address ! <tt/php...@li.../. To subscribe to the ! list, send a message with <tt/subscribe/ as the subject to the ! address <tt/php...@li.../. <descrip> Index: 02-download.sgml =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/doc/sgml/02-download.sgml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** 02-download.sgml 2000/04/17 16:39:58 1.1.1.1 --- 02-download.sgml 2001/08/13 12:30:05 1.2 *************** *** 3,8 **** <sect1>Downloading and unpacking the distribution ! <p>The base library is supplied at <htmlurl ! url="http://phplib.netuse.de/" name="the PHP Base Library download location">. Two different formats are provided: A tar.gz version and a shar version. --- 3,8 ---- <sect1>Downloading and unpacking the distribution ! <p>The base library is available from <htmlurl ! url="http://phplib.sourceforge.net/" name="the PHP Base Library download location">. Two different formats are provided: A tar.gz version and a shar version. *************** *** 19,25 **** your Unix shell (for example, by typing <tt/sh phplib.shar/). ! The <htmlurl url="mailto:ph...@li..." name="PHPLIB support mailing list"> is available should you run into problems ! with the library. To subscribe send the command <tt/subscribe/ ! to <htmlurl url="mailto:php...@li..." ! name="the mailing list subscription address">. --- 19,25 ---- your Unix shell (for example, by typing <tt/sh phplib.shar/). ! The <htmlurl url="mailto:php...@li..." name="PHPLIB support mailing list"> is available should you run into problems ! with the library. To subscribe to the list, send a message with ! <tt/subscribe/ as the subject to the address ! <tt/php...@li.../. Index: 02-mod_php.sgml =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/doc/sgml/02-mod_php.sgml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** 02-mod_php.sgml 2000/04/17 16:39:59 1.1.1.1 --- 02-mod_php.sgml 2001/08/13 12:30:06 1.2 *************** *** 38,42 **** <tscreen><code> ! <Directory /home/www/servers/phplib.netuse.de/pages> php3_include_path "/bla" </Directory> --- 38,42 ---- <tscreen><code> ! <Directory /home/www/servers/www.example.com/pages> php3_include_path "/bla" </Directory> Index: 02-procedure.sgml =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/doc/sgml/02-procedure.sgml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** 02-procedure.sgml 2000/04/17 16:39:59 1.1.1.1 --- 02-procedure.sgml 2001/08/13 12:30:06 1.2 *************** *** 19,29 **** <tscreen><code> ! /home/www/servers/phplib.netuse.de/pages <- document root ! cgi <- php binary ! php <- includes and prepends </code></tscreen> ! Make this php directory your php include directory: Put ! <tt>include_path = /home/www/servers/phplib.netuse.de/php</tt> into <tt>cgi/php3.ini</tt>. If you already have an include path defined in your setup, add the PHPLIB include path to the --- 19,29 ---- <tscreen><code> ! /home/www/servers/www.example.com/pages <- document root ! cgi <- php binary ! php <- includes and prepends </code></tscreen> ! Make this php directory your php include directory: Put ! <tt>include_path = /home/www/servers/www.example.com/php</tt> into <tt>cgi/php3.ini</tt>. If you already have an include path defined in your setup, add the PHPLIB include path to the *************** *** 57,61 **** statement has to be adapted to reflect this). ! Assuming your database server is named <tt/database.netuse.de/ and your CGI user is <tt/webuser/ and you are accessing the database <tt/myapp/, do --- 57,61 ---- statement has to be adapted to reflect this). ! Assuming your database server is named <tt/database.example.com/ and your CGI user is <tt/webuser/ and you are accessing the database <tt/myapp/, do *************** *** 88,92 **** here and we add the statement <tt>auto_prepend_file = ! /home/www/servers/phplib.netuse.de/php/prepend.php3</tt> to our <tt/php3.ini/. --- 88,92 ---- here and we add the statement <tt>auto_prepend_file = ! /home/www/servers/www.example.com/php/prepend.php3</tt> to our <tt/php3.ini/. *************** *** 109,116 **** <tag>Subscribe for support</tag> ! Subscribe to the mailing list <htmlurl url="mailto:ph...@li..." ! name="ph...@li...">. Do so by sending a mail body of <tt/subscribe/ ! to <htmlurl url="mailto:php...@li..." ! name="php...@li..."> and follow instructions. Share your ! experiences. </descrip> --- 109,116 ---- <tag>Subscribe for support</tag> ! The <htmlurl url="mailto:php...@li..." name="PHPLIB ! support mailing list"> is available should you run into problems ! with the library. To subscribe to the list, send a message with ! <tt/subscribe/ as the subject to the address ! <tt/php...@li.../. </descrip> Index: 03-auth.sgml =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/doc/sgml/03-auth.sgml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** 03-auth.sgml 2000/04/17 16:40:00 1.1.1.1 --- 03-auth.sgml 2001/08/13 12:30:06 1.2 *************** *** 381,385 **** This feature has originally been written for the PHPLIB mailing ! list by Kristian Köhntopp and was included into the documentation later. --- 381,385 ---- This feature has originally been written for the PHPLIB mailing ! list by Kristian Koehntopp and was included into the documentation later. Index: 03-ct_file.sgml =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/doc/sgml/03-ct_file.sgml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** 03-ct_file.sgml 2000/04/17 16:40:00 1.1.1.1 --- 03-ct_file.sgml 2001/08/13 12:30:06 1.2 *************** *** 5,9 **** To let Session use a file as a container, you use ! CT_Fole. <sect2>Instance variables --- 5,9 ---- To let Session use a file as a container, you use ! CT_File. <sect2>Instance variables Index: 03-db_sql.sgml =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/doc/sgml/03-db_sql.sgml,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** 03-db_sql.sgml 2000/04/17 16:40:01 1.1.1.1 --- 03-db_sql.sgml 2001/08/13 12:30:06 1.2 *************** *** 39,43 **** revision<colsep>Contant version string: The version of the database API ! (e.g. 1.2), NOT the CVS revision of the file implementing the API. Sql_Table<colsep>string: The name of the table used by the --- 39,43 ---- revision<colsep>Contant version string: The version of the database API ! (e.g. 1.2), NOT the CVS revision of the file implementing the API.<rowsep> Sql_Table<colsep>string: The name of the table used by the |
From: Richard A. <ric...@us...> - 2001-08-13 12:30:08
|
Update of /cvsroot/phplib/php-lib-stable In directory usw-pr-cvs1:/tmp/cvs-serv19803 Modified Files: CREDITS HELP Log Message: Remove references to NetUSE from docs and HELP. Index: CREDITS =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/CREDITS,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CREDITS 2000/07/12 18:22:30 1.2 --- CREDITS 2001/08/13 12:30:05 1.3 *************** *** 6,10 **** Development, all classes ! Kristian Köhntopp NetUSE AG kk...@ne... --- 6,10 ---- Development, all classes ! Kristian Koehntopp NetUSE AG kk...@ne... Index: HELP =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/HELP,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** HELP 2000/04/17 16:39:53 1.1.1.1 --- HELP 2001/08/13 12:30:05 1.2 *************** *** 3,8 **** Read the documentation! ! See our website at http://phplib.shonline.de/. ! Join our mailing list at ph...@li... (send "subscribe" to ! php...@li...). --- 3,10 ---- Read the documentation! ! See our website at http://phplib.sourceforge.net/ ! Join the phplib-users mailing list. Either visit ! http://lists.sourceforge.net/lists/listinfo/phplib-users ! or send an email with "subscribe" in the subject to ! php...@li... |
From: Richard A. <ric...@us...> - 2001-08-13 12:22:10
|
Update of /cvsroot/phplib/php-lib/doc/sgml In directory usw-pr-cvs1:/tmp/cvs-serv17957/doc/sgml Modified Files: 01-insttest.sgml 02-download.sgml 02-mod_php.sgml 02-procedure.sgml 03-auth.sgml 03-ct_file.sgml Log Message: Remove some of the references to NetUSE Index: 01-insttest.sgml =================================================================== RCS file: /cvsroot/phplib/php-lib/doc/sgml/01-insttest.sgml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** 01-insttest.sgml 1999/10/29 11:26:01 1.4 --- 01-insttest.sgml 2001/08/13 12:22:07 1.5 *************** *** 10,15 **** We do have a support mailing list available under the address ! <tt/ph...@li.../. To subscribe to the list, send the command ! <tt/subscribe/ to the address <tt/php...@li.../. <descrip> --- 10,16 ---- We do have a support mailing list available under the address ! <tt/php...@li.../. To subscribe to the ! list, send a message with <tt/subscribe/ as the subject to the ! address <tt/php...@li.../. <descrip> Index: 02-download.sgml =================================================================== RCS file: /cvsroot/phplib/php-lib/doc/sgml/02-download.sgml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** 02-download.sgml 1999/10/24 12:15:19 1.2 --- 02-download.sgml 2001/08/13 12:22:07 1.3 *************** *** 3,8 **** <sect1>Downloading and unpacking the distribution ! <p>The base library is supplied at <htmlurl ! url="http://phplib.netuse.de/" name="the PHP Base Library download location">. Two different formats are provided: A tar.gz version and a shar version. --- 3,8 ---- <sect1>Downloading and unpacking the distribution ! <p>The base library is available from <htmlurl ! url="http://phplib.sourceforge.net/" name="the PHP Base Library download location">. Two different formats are provided: A tar.gz version and a shar version. *************** *** 19,25 **** your Unix shell (for example, by typing <tt/sh phplib.shar/). ! The <htmlurl url="mailto:ph...@li..." name="PHPLIB support mailing list"> is available should you run into problems ! with the library. To subscribe send the command <tt/subscribe/ ! to <htmlurl url="mailto:php...@li..." ! name="the mailing list subscription address">. --- 19,25 ---- your Unix shell (for example, by typing <tt/sh phplib.shar/). ! The <htmlurl url="mailto:php...@li..." name="PHPLIB support mailing list"> is available should you run into problems ! with the library. To subscribe to the list, send a message with ! <tt/subscribe/ as the subject to the address ! <tt/php...@li.../. Index: 02-mod_php.sgml =================================================================== RCS file: /cvsroot/phplib/php-lib/doc/sgml/02-mod_php.sgml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** 02-mod_php.sgml 1999/10/24 12:15:19 1.2 --- 02-mod_php.sgml 2001/08/13 12:22:07 1.3 *************** *** 38,42 **** <tscreen><code> ! <Directory /home/www/servers/phplib.netuse.de/pages> php3_include_path "/bla" </Directory> --- 38,42 ---- <tscreen><code> ! <Directory /home/www/servers/www.example.com/pages> php3_include_path "/bla" </Directory> Index: 02-procedure.sgml =================================================================== RCS file: /cvsroot/phplib/php-lib/doc/sgml/02-procedure.sgml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** 02-procedure.sgml 1999/10/24 12:15:20 1.3 --- 02-procedure.sgml 2001/08/13 12:22:07 1.4 *************** *** 19,29 **** <tscreen><code> ! /home/www/servers/phplib.netuse.de/pages <- document root ! cgi <- php binary ! php <- includes and prepends </code></tscreen> ! Make this php directory your php include directory: Put ! <tt>include_path = /home/www/servers/phplib.netuse.de/php</tt> into <tt>cgi/php3.ini</tt>. If you already have an include path defined in your setup, add the PHPLIB include path to the --- 19,29 ---- <tscreen><code> ! /home/www/servers/www.example.com/pages <- document root ! cgi <- php binary ! php <- includes and prepends </code></tscreen> ! Make this php directory your php include directory: Put ! <tt>include_path = /home/www/servers/www.example.com/php</tt> into <tt>cgi/php3.ini</tt>. If you already have an include path defined in your setup, add the PHPLIB include path to the *************** *** 57,61 **** statement has to be adapted to reflect this). ! Assuming your database server is named <tt/database.netuse.de/ and your CGI user is <tt/webuser/ and you are accessing the database <tt/myapp/, do --- 57,61 ---- statement has to be adapted to reflect this). ! Assuming your database server is named <tt/database.example.com/ and your CGI user is <tt/webuser/ and you are accessing the database <tt/myapp/, do *************** *** 88,92 **** here and we add the statement <tt>auto_prepend_file = ! /home/www/servers/phplib.netuse.de/php/prepend.php3</tt> to our <tt/php3.ini/. --- 88,92 ---- here and we add the statement <tt>auto_prepend_file = ! /home/www/servers/www.example.com/php/prepend.php3</tt> to our <tt/php3.ini/. *************** *** 109,116 **** <tag>Subscribe for support</tag> ! Subscribe to the mailing list <htmlurl url="mailto:ph...@li..." ! name="ph...@li...">. Do so by sending a mail body of <tt/subscribe/ ! to <htmlurl url="mailto:php...@li..." ! name="php...@li..."> and follow instructions. Share your ! experiences. </descrip> --- 109,116 ---- <tag>Subscribe for support</tag> ! The <htmlurl url="mailto:php...@li..." name="PHPLIB ! support mailing list"> is available should you run into problems ! with the library. To subscribe to the list, send a message with ! <tt/subscribe/ as the subject to the address ! <tt/php...@li.../. </descrip> Index: 03-auth.sgml =================================================================== RCS file: /cvsroot/phplib/php-lib/doc/sgml/03-auth.sgml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** 03-auth.sgml 1999/10/29 17:04:45 1.5 --- 03-auth.sgml 2001/08/13 12:22:07 1.6 *************** *** 381,385 **** This feature has originally been written for the PHPLIB mailing ! list by Kristian Köhntopp and was included into the documentation later. --- 381,385 ---- This feature has originally been written for the PHPLIB mailing ! list by Kristian Koehntopp and was included into the documentation later. Index: 03-ct_file.sgml =================================================================== RCS file: /cvsroot/phplib/php-lib/doc/sgml/03-ct_file.sgml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** 03-ct_file.sgml 1999/08/27 15:27:12 1.1 --- 03-ct_file.sgml 2001/08/13 12:22:07 1.2 *************** *** 5,9 **** To let Session use a file as a container, you use ! CT_Fole. <sect2>Instance variables --- 5,9 ---- To let Session use a file as a container, you use ! CT_File. <sect2>Instance variables |
From: Richard A. <ric...@us...> - 2001-08-13 12:22:10
|
Update of /cvsroot/phplib/php-lib In directory usw-pr-cvs1:/tmp/cvs-serv17957 Modified Files: HELP Log Message: Remove some of the references to NetUSE Index: HELP =================================================================== RCS file: /cvsroot/phplib/php-lib/HELP,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** HELP 1999/10/27 06:38:30 1.4 --- HELP 2001/08/13 12:22:07 1.5 *************** *** 3,8 **** Read the documentation! ! See our website at http://phplib.netuse.de/. ! Join our mailing list at ph...@li... (send "subscribe" to ! php...@li...). --- 3,10 ---- Read the documentation! ! See our website at http://phplib.sourceforge.net/ ! Join the phplib-users mailing list. Either visit ! http://lists.sourceforge.net/lists/listinfo/phplib-users ! or send an email with "subscribe" in the subject to ! php...@li... |
From: Ulf W. <uw...@ne...> - 2001-08-13 11:25:17
|
Hi there, now that Kristian has decided to close the cvs at NetUSE I've changed my policy about the OOH Form rewrite slightly. I always said that I'd finish the work on it in the phplib cvs before I check it into pear. Now that I've had to update my cvs anyway I've decided to take it into pear - just made the commit. I suggest that you remove the form stuff from the cvs - I can do this myself if I get a cvs write account (user: ulf_wendel). Thanks, Ulf --=20 NetUSE AG Dr.-Hell-Stra=DFe Fon: +49 431 386 436 00=20 http://www.netuse.de/ D-24107 Kiel Fax: +49 431 386 435 99 PHP lernen? Noch sind Schulungspl=E4tze frei: http://www.netuse.de/ |
From: Richard A. <ric...@us...> - 2001-08-12 23:24:22
|
Update of /cvsroot/phplib/php-lib-stable In directory usw-pr-cvs1:/tmp/cvs-serv725 Modified Files: TODO Log Message: Bugs have been entered into the SourceForge bug tracker. Index: TODO =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/TODO,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** TODO 2001/06/04 22:24:18 1.8 --- TODO 2001/08/12 23:24:20 1.9 *************** *** 2,100 **** $Id$ ! Things To Do for Release 7.2d: ! ! 1. Fix know bugs: ! ! 1) db_mysql.inc, function unlock() needs one line fix to mysql_query() ! to add $this->Link_ID. ! ! 2) ct_sql.inc, function ac_store() needs one line fix to if {} after ! $this->db->query($uquery) to prevent duplicate active sessions. ! ! 3) table.inc -- next_record() is called twice in the show_result() method, ! "swallows" the first result row ! ! 4) table.inc -- should be $this->print_array($d); instead of print_array($d) in several ! places. ! ! 5) db_mssql.inc, line 126 -- uses mssql_affected_rows(), which does not exist in PHP. ! ! 6) prepend.php3 -- security problem as described below: ! There appears to be a security hole in the PHPLib prepend.php3 file by ! default. There is a section where $_PHPLIB['libdir'] is set if it is not ! already set. This allows somebody to pass a value for the variable with the ! GET if register globals is set. If php is set to allow url's with fopen ! (which is the default) it is possible to supply your own include files to ! PHPLib. You can pretty much run anything you want. Am I missing something? ! How is this variable expected to be set prior to encountering prepend.php3? ! The documentaion only mentions this variable in passing, mostly just to say ! that the name is used. It is possible to bypass this problem just by ! explicitly setting the variable in prepend.php3, so it's easy to fix. I ! would appreciate any information on this you can give me. William Stockall. ! ! ! *) Others as they are found, reported or documented. ! ! Some possible bugs reported by Forrest J Cavalier III ! (fo...@mi...): ! ! I am using a new tool for PHP code auditing. ! ! I found three items while auditing table.inc ! of 7.2.b. ! ! ---------------------------------------------- ! function show_table_page_rows() ! ! uses $key,$val, but does not set them: ! $this->table_row($row, $key, $val, $class); ! ! (This may be serious, I don't know) ! ! ---------------------------------------------- ! function show_table_heading_cells() ! has the line: ! $cell = 0; ! ! which I think that should be $col = 0; (or ! the later line in that function should have ! $cell++) ! ! Since table_heading_cell() doesn't use the first ! argument, it seems like there is no observable ! defect. ! ! ---------------------------------------------- ! function table_heading_cell() ! ! sets $found, but never uses it. ! ! Doing a little bit more auditing. (Again, ! this is just for testing the tool. I only ! have done table.inc and now db_mysql.inc ! from phplib...) ! ! I'm not sure this is a bug... ! In db_mysql.inc seek() ! $this->Row = $this->num_rows; ! ! There is a num_rows function, but not a num_rows ! member variable. ! ! Does PHP call the function even when there are no ()? ! ------------------------------------------- ! In db_mysql.inc lock() ! ! there is error handling code... ! ! if (!$res) { ! $this->halt("lock($table, $mode) failed."); ! return 0; ! } ! ! which doesn't work so well when $table is an ! array. ! 2. Certify correct for use with both PHP3 and PHP4. --- 2,9 ---- $Id$ ! Things To Do for Release 7.2e: + 1. Fix known bugs. See the phplib bug tracker on SourceForge: + http://sourceforge.net/tracker/?group_id=31885&atid=403611 2. Certify correct for use with both PHP3 and PHP4. |
From: Richard A. <ric...@us...> - 2001-08-12 23:23:22
|
Update of /cvsroot/phplib/php-lib/php/db/mysql In directory usw-pr-cvs1:/tmp/cvs-serv479 Modified Files: db_sql.inc Log Message: track a bug fix from the -stable tree Index: db_sql.inc =================================================================== RCS file: /cvsroot/phplib/php-lib/php/db/mysql/db_sql.inc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** db_sql.inc 2000/07/24 01:33:52 1.3 --- db_sql.inc 2001/08/12 23:23:20 1.4 *************** *** 157,161 **** $this->connect(); ! $res = @mysql_query('unlock tables'); if (!$res) { $this->halt('unlock() failed.'); --- 157,161 ---- $this->connect(); ! $res = @mysql_query('unlock tables', $this->Link_ID); if (!$res) { $this->halt('unlock() failed.'); |
From: Richard A. <ric...@us...> - 2001-08-12 05:24:46
|
Update of /cvsroot/phplib/php-lib-stable/php In directory usw-pr-cvs1:/tmp/cvs-serv6415 Modified Files: auth.inc db_mysql.inc session.inc Log Message: Fixed some access to undefined variable warnings. Bug IDs: #447479, #447487, #447526, #447530 Index: auth.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/auth.inc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** auth.inc 2000/07/12 18:22:33 1.2 --- auth.inc 2001/08/12 05:24:44 1.3 *************** *** 38,42 **** var $auth = array(); ## Data array ! var $in; var $db; --- 38,42 ---- var $auth = array(); ## Data array ! var $in = false; var $db; *************** *** 233,236 **** --- 233,238 ---- function is_authenticated() { if ( + isset($this->auth["uid"]) + && $this->auth["uid"] && Index: db_mysql.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/db_mysql.inc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** db_mysql.inc 2001/05/17 00:57:31 1.3 --- db_mysql.inc 2001/08/12 05:24:44 1.4 *************** *** 225,233 **** function f($Name) { ! return $this->Record[$Name]; } function p($Name) { ! print $this->Record[$Name]; } --- 225,237 ---- function f($Name) { ! if (isset($this->Record[$Name])) { ! return $this->Record[$Name]; ! } } function p($Name) { ! if (isset($this->Record[$Name])) { ! print $this->Record[$Name]; ! } } Index: session.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/session.inc,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** session.inc 2001/07/09 15:33:29 1.7 --- session.inc 2001/08/12 05:24:44 1.8 *************** *** 63,67 **** function is_registered($name) { ! if ($this->pt[$name] == true) return true; return false; --- 63,67 ---- function is_registered($name) { ! if (isset($this->pt[$name]) && $this->pt[$name] == true) return true; return false; |
From: Richard A. <ric...@us...> - 2001-08-12 04:58:39
|
Update of /cvsroot/phplib/php-lib/php/session In directory usw-pr-cvs1:/tmp/cvs-serv4113/session Modified Files: session3.inc Log Message: fix a few undefined variable access warnings Track changes to session from -stable tree Index: session3.inc =================================================================== RCS file: /cvsroot/phplib/php-lib/php/session/session3.inc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** session3.inc 2000/09/07 15:56:08 1.3 --- session3.inc 2001/08/12 04:58:36 1.4 *************** *** 32,36 **** ## page_close() guaranteed. ! var $allowcache = "passive"; ## "passive", "no", "private" or "public" var $allowcache_expire = 1440; ## If you allowcache, data expires in this ## many minutes. --- 32,36 ---- ## page_close() guaranteed. ! var $allowcache = "no"; ## "passive", "no", "private" or "public" var $allowcache_expire = 1440; ## If you allowcache, data expires in this ## many minutes. *************** *** 64,68 **** function is_registered($name) { ! if ($this->pt[$name] == true) return true; return false; --- 64,68 ---- function is_registered($name) { ! if (isset($this->pt[$name]) && $this->pt[$name] == true) return true; return false; *************** *** 264,270 **** } ! ## serialize($prefix,&$str): ## ! ## appends a serialized representation of $$prefix ## at the end of $str. ## --- 264,270 ---- } ! ## serialize($var,&$str): ## ! ## appends a serialized representation of $$var ## at the end of $str. ## *************** *** 466,472 **** # Note that in HTTP/1.1 the Cache-Control headers override the Expires # headers and HTTP/1.0 ignores headers it does not recognize (e.g, ! # Cache-Control). Mulitple Cache-Control directives are contained ! # in a single header(), since PHP only sends one HTTP header per ! # header field-name (e.g., cache-control, Expires...) switch ($this->allowcache) { --- 466,475 ---- # Note that in HTTP/1.1 the Cache-Control headers override the Expires # headers and HTTP/1.0 ignores headers it does not recognize (e.g, ! # Cache-Control). Mulitple Cache-Control directives are split into ! # mulitple headers to better support MSIE 4.x. ! # ! # Added pre- and post-check for MSIE 5.x as suggested by R.C.Winters, ! # see http://msdn.microsoft.com/workshop/author/perf/perftips.asp#Use%20Cache-Control%20Extensions ! # for details switch ($this->allowcache) { *************** *** 474,477 **** --- 477,482 ---- $mod_gmt = gmdate("D, d M Y H:i:s", getlastmod()) . " GMT"; header("Last-Modified: " . $mod_gmt); + # possibly ie5 needs the pre-check line. This needs testing. + header("Cache-Control: post-check=0, pre-check=0"); break; *************** *** 481,485 **** header("Expires: " . $exp_gmt); header("Last-Modified: " . $mod_gmt); ! header("Cache-Control: public, max-age=" . $this->allowcache_expire * 60); break; --- 486,491 ---- header("Expires: " . $exp_gmt); header("Last-Modified: " . $mod_gmt); ! header("Cache-Control: public"); ! header("Cache-Control: max-age=" . $this->allowcache_expire * 60); break; *************** *** 488,492 **** header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . $mod_gmt); ! header("Cache-Control: private, max-age=" . $this->allowcache_expire * 60); break; --- 494,500 ---- header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . $mod_gmt); ! header("Cache-Control: private"); ! header("Cache-Control: max-age=" . $this->allowcache_expire * 60); ! header("Cache-Control: pre-check=" . $this->allowcache_expire * 60); break; *************** *** 495,498 **** --- 503,507 ---- header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-cache"); + header("Cache-Control: post-check=0, pre-check=0"); header("Pragma: no-cache"); break; |
From: Richard A. <ric...@us...> - 2001-08-12 04:58:39
|
Update of /cvsroot/phplib/php-lib/php/auth In directory usw-pr-cvs1:/tmp/cvs-serv4113/auth Modified Files: auth.inc auth4.inc Log Message: fix a few undefined variable access warnings Track changes to session from -stable tree Index: auth.inc =================================================================== RCS file: /cvsroot/phplib/php-lib/php/auth/auth.inc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** auth.inc 2000/04/13 13:06:55 1.1 --- auth.inc 2001/08/12 04:58:36 1.2 *************** *** 244,247 **** --- 244,249 ---- function is_authenticated() { if ( + isset($this->auth["uid"]) + && $this->auth["uid"] && Index: auth4.inc =================================================================== RCS file: /cvsroot/phplib/php-lib/php/auth/auth4.inc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** auth4.inc 2001/06/05 13:08:55 1.1 --- auth4.inc 2001/08/12 04:58:36 1.2 *************** *** 227,230 **** --- 227,232 ---- function is_authenticated() { if ( + isset($this->auth["uid"]) + && $this->auth["uid"] && |
From: Richard A. <ric...@us...> - 2001-08-12 04:56:09
|
Update of /cvsroot/phplib/php-lib/php/phplib-4 In directory usw-pr-cvs1:/tmp/cvs-serv3611 Modified Files: prepend.php4 Log Message: fix the $_PHPLIB["libdir"] security hole by tracking the -stable tree Index: prepend.php4 =================================================================== RCS file: /cvsroot/phplib/php-lib/php/phplib-4/prepend.php4,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** prepend.php4 2000/11/20 01:22:10 1.2 --- prepend.php4 2001/08/12 04:56:06 1.3 *************** *** 10,19 **** */ ! if (!isset($_PHPLIB) or !is_array($_PHPLIB)) { ! # Aren't we nice? We are prepending this everywhere ! # we require or include something so you can fake ! # include_path when hosted at provider that sucks. ! $_PHPLIB["libdir"] = ""; ! } require($_PHPLIB["libdir"] . "db_mysql.inc"); /* Change this to match your database. */ --- 10,18 ---- */ ! $_PHPLIB = array(); ! ! # Can't control your include path? ! # Point this to your PHPLIB base directory. Use trailing "/"! ! $_PHPLIB["libdir"] = ""; require($_PHPLIB["libdir"] . "db_mysql.inc"); /* Change this to match your database. */ |