phpslash-commit Mailing List for phpSlash (Page 69)
Brought to you by:
joestewart,
nhruby
This list is closed, nobody may subscribe to it.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(11) |
Nov
(59) |
Dec
(60) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(52) |
Feb
(77) |
Mar
(118) |
Apr
(76) |
May
(106) |
Jun
(145) |
Jul
(9) |
Aug
(15) |
Sep
(78) |
Oct
(83) |
Nov
(105) |
Dec
(51) |
2003 |
Jan
(105) |
Feb
(100) |
Mar
(111) |
Apr
(149) |
May
(95) |
Jun
(56) |
Jul
(8) |
Aug
(2) |
Sep
|
Oct
(22) |
Nov
(117) |
Dec
(6) |
2004 |
Jan
(1) |
Feb
|
Mar
(3) |
Apr
(25) |
May
|
Jun
(11) |
Jul
(26) |
Aug
(85) |
Sep
(119) |
Oct
(312) |
Nov
(271) |
Dec
(5) |
2005 |
Jan
(6) |
Feb
|
Mar
|
Apr
(12) |
May
(7) |
Jun
(8) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Matthew L. <sym...@us...> - 2002-12-11 19:39:18
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory sc8-pr-cvs1:/tmp/cvs-serv23527 Added Files: lib.resources.php Log Message: New functions to register classes and libraries, their requirements and their replacements. A pslNew function checks to make sure the class is loaded before instantiating, as well as allows user overrides. --- NEW FILE: lib.resources.php --- <?php /** * PHPSlash Resource Library * * Definition: A "resource" is anything that can be loaded. Currently * used resources are classes and libraries. By library we mean * basically any PHP application that provides functionality without * producing output. * * The resources library provides functions for declaring what classes * or libraries require which, and a loader which includes the necessary * files to make instantiation succeed. This way only the class files * which are necessary get loaded. PHPSlash users can even replace * classes with their own via the AddClassReplacement function. * * @author sympleko (lei...@ma...) * * $Id: lib.resources.php,v 1.1 2002/12/11 19:39:15 sympleko Exp $ **/ /** * Instantiate a new object. * * Internally calls loadClass to make sure the object is ready to be * constructed (I.e., that the class file has been loaded). * * By calling addClassReplacement($class,$whatever) you can replace this * class with a derived or compatible one. * * Cribbed from phpgroupware's CreateObject function. I'm leaving their names * on as authors. * @link http://savannah.gnu.org/cgi-bin/viewcvs/phpgroupware/phpgwapi/inc/common_functions.inc.php?rev=1.13&content-type=text/vnd.viewcvs-markup * * @author mdean * @author milosch * @author (thanks to jengo and ralf) * @syntax CreateObject('class', 'constructor_params'); * @param string name of class * @param string class parameters (all optional) **/ function pslNew($class, $p1='_UNDEF_',$p2='_UNDEF_',$p3='_UNDEF_',$p4='_UNDEF_', $p5='_UNDEF_',$p6='_UNDEF_',$p7='_UNDEF_',$p8='_UNDEF_', $p9='_UNDEF_',$p10='_UNDEF_',$p11='_UNDEF_',$p12='_UNDEF_', $p13='_UNDEF_',$p14='_UNDEF_',$p15='_UNDEF_',$p16='_UNDEF_') { $fs = "pslNew(\"$class\")"; // debug($fs,"begin"); /* override if desired */ $class = pslGetClass($class); /* then we load all necessary classes. */ loadClass($class); if (class_exists($class)) { /* Now, we generate the code: * "$obj = new($class,$arg1,$arg2,...) */ if ($p1 == '_UNDEF_' && $p1 != 1) { eval('$obj = new ' . $class . ';'); } else { $input = array($p1,$p2,$p3,$p4,$p5,$p6,$p7,$p8,$p9,$p10,$p11,$p12,$p13,$p14,$p15,$p16); $i = 1; $code = '$obj = new ' . $class . '('; while (list($x,$test) = each($input)) { if (($test == '_UNDEF_' && $test != 1 ) || $i == 17) { break; } else { $code .= '$p' . $i . ','; } $i++; } $code = substr($code,0,-1) . ');'; eval($code); } /* error_reporting(E_ERROR | E_WARNING | E_PARSE); */ // debug($fs,"end"); return $obj; } /* end if class_exists($class) */ else { error("No such class: $class"); return false; } } /** * loads the files necessary to make a successful instantiation of a class * * @access public * @param string class * @return bool success */ function loadClass($class) { $fn = "loadClass"; $fc = "$fn(\"$class\")"; // debug($fc,"begin"); $urn = classUrn($class); return load_resource($urn); } /** * loads a library that has been registered in the resources area * * @access public * @param string library name * @return bool success */ function loadLibrary($lib) { return load_resource(libUrn($lib)); } /** * returns the class specified, which may have been overridden by * configuration * * @access public * @param string class name * @return string overidden class name, or original */ function pslGetClass($class) { $fn = "pslGetClass"; $fc = "$fn(\"$class\")"; // debug($fc,"begin"); $urn = classUrn($class); $rep = resource_replacement($urn); list($nid,$nss) = parse_urn($urn); if ('class' == $nid) { $answer = $nss; } else { $answer = $class; } // debug("$fn:answer",$answer); return $answer; } /** * add a class requirement * * loadClass will make sure the required class or library is loaded before this * Resources will be loaded in the order they are specified, so take care. * * @access public * @param string class, URN, or URI * @param string required class * @return true */ function addClassRequirement($class,$reqClass) { // debug("addClassRequirement($class, $reqClass)","begin"); $urn = classUrn($class); if (is_urn($reqClass)) { return add_resource_requirement($reqClass); } elseif ($FILE = @fopen($reqClass,'r')) { fclose($FILE); // not a required class, but a required file return add_resource_requirement($urn,$reqClass); } else { $reqUrn = classUrn($reqClass); return add_resource_requirement($urn,$reqUrn); } } /** * add a library requirement * * "Library" is just a collection of one or more php files which are expected * to have function definitions and other non-output-producing code in them. * * @access public * @param string library name * @param requirement libarary, URI, or URN */ function addLibraryRequirement($lib,$reqLib) { // debug("addClassRequirement($lib, $reqLib)","begin"); $urn = libUrn($lib); if (is_urn($reqLib)) { return add_resource_requirement($urn,$reqLib); } elseif ($FILE = @fopen($reqLib,'r')) { // not a required class, but a required file fclose($FILE); return add_resource_requirement($urn,$reqLib); } else { $reqUrn = libUrn($reqLib); return add_resource_requirement($urn,$reqUrn); } } /** * add a class replacement * * pslGetClass will return this class instead of the standard one * * @access public * @param string class * @param string replacement class * @return true */ function addClassReplacement($class,$repClass) { $urn = classUrn($class); $repUrn = classUrn($repClass); return add_resource_replacement($urn,$repUrn); } function classUrn($class) { return "urn:class:" . strtolower($class); } function libUrn($lib) { return "urn:lib:" . strtolower($lib); } /** * URN/RDF functions for specific tags and loading */ /** * return the resources required for successful loading of this one * * @access private * @param string URN * @return array required resources, or false if URN is not valid. */ function resource_requirements($urn) { return resource_data($urn,"requires"); } /** * returns the resource specified to replace this one through customization * * @access private * @param string URN * @return string replacement URN */ function resource_replacement($urn) { return resource_data($urn,"isReplacedBy"); } /** * add a requirement to the specified resources * * @access private * @param string URN * @param string required URN * @return true */ function add_resource_requirement($urn,$reqUrn) { // debug("add_resource_requirement($urn,$reqUrn)","begin"); return add_resource_data_multiple($urn,"requires",$reqUrn); } /** * add a replacement to the specified resources * * @param string URN * @param string replacement URN * @return true */ function add_resource_replacement($urn,$repUrn) { return add_resource_data_single($urn,"isReplacedBy",$repUrn); } /** * loads a resource (URN) and all resources it requires * * @access private * @param string urn * @return success **/ function load_resource($urn) { $fs = "load_resource(\"$urn\")"; // debug($fs,"begin"); $success = true; if (!is_valid_urn($urn)) { error("Resource $urn is not known."); $success = false; } else { $requirements = resource_requirements($urn); // debug("requirements",$requirements); foreach($requirements as $req) { if (is_urn($req)) { load_resource($req); } else { $includedFiles = get_included_files(); if (!in_array($req,$includedFiles)) { if (!include_once($req)) { error("Include failed: $req."); $success = false; } else { // debug($fs,"$req successfully loaded"); } } else { // debug($fs,"$req already loaded"); } } } } // debug($fs,"end"); return $success; } /** * URN string functions **/ /** * parse a URN into NID and NSS * * URNs look like "urn:<NID>:<NSS>". <NID> (Namespace Identifier) can * have letters, numbers, or hyphens, but can't start with a hyphen. * <NSS> (Namespace Specific String) can have letters, numbers, any of * the punctuation marks "()+,-.:=@;$_!*'", or any other character * encoded by a hex byte "%xx". * * @link http://www.ietf.org/rfc/rfc2141.txt * @param string urn * @return array hash with keys "NID" and "NSS", or empty if no match **/ function parse_urn($urn) { $nidRE = "[A-Za-z0-9][A-Za-z0-9-]{1,31}"; $nssRE = "([A-Za-z0-9()+,.:=@;\$_!*'-]|%[0-9A-Fa-f]{2})+"; preg_match("/^urn:($nidRE):($nssRE)\$/",$urn,$matches); if ($matches) { $ans = array('NID'=>$matches[1], 'NSS'=>$matches[2]); } else { $ans = array(); } return $ans; } /** * check if string is a well-formed URN * * @param string prospective URN * @return bool success */ function is_urn($string) { return parse_urn($string) ? true : false; } /** * URN/RDF low-level functions */ /** * check if information is known about a URN * * @access private * @param string URN * @return bool if valid */ function is_valid_urn($urn) { return $GLOBALS['_PSL']['resources'][$urn] ? true : false; } /** * return specific RDF tag about a resource * * @param string URN * @param string key (tagname) * @return string data if exists */ function resource_data($urn,$key) { $fn = "resource_data"; $fc = "$fn(\"$urn\",\"$key\")"; // debug($fc,"begin"); $answer = $GLOBALS['_PSL']['resources'][$urn][$key]; // debug("$fc:answer",$answer); return $answer; } function add_resource_data_single($urn,$key,$value) { $GLOBALS['_PSL']['resources'][$urn][$key] = $value; return true; } function add_resource_data_multiple($urn,$key,$value) { // debug("add_resource_data_multiple($urn, $key, $value)","begin"); $arr =& $GLOBALS['_PSL']['resources'][$urn][$key]; if (!is_array($arr) || !in_array($value,$arr)) { $arr[] = $value; } return true; } ?> |
From: Joe S. <joe...@us...> - 2002-12-05 13:15:02
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory sc8-pr-cvs1:/tmp/cvs-serv18236/phpslash-ft/public_html Modified Files: profile.php3 Log Message: small permission changes Index: profile.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/profile.php3,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** profile.php3 4 Dec 2002 19:51:25 -0000 1.6 --- profile.php3 5 Dec 2002 13:14:59 -0000 1.7 *************** *** 59,70 **** switch ($ary['submit']) { case "update": ! if($author->saveProfile($ary)) { ! $content .= getMessage("Profile Updated"); ! // expire cache for this session ! jpcache_gc('string', "-slashSess-" . $sess->id, "100"); ! } else { ! $content .= getError("Profile not updated"); ! } case "edit": default: --- 59,72 ---- switch ($ary['submit']) { case "update": ! if ($perm->have_perm("authorprofileSave")) { ! if($author->saveProfile($ary)) { ! $content .= getMessage("Profile Updated"); ! // expire cache for this session ! jpcache_gc('string', "-slashSess-" . $sess->id, "100"); ! } else { ! $content .= getError("Profile not updated"); ! } ! } case "edit": default: |
From: Joe S. <joe...@us...> - 2002-12-05 13:15:02
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/admin In directory sc8-pr-cvs1:/tmp/cvs-serv18236/phpslash-ft/public_html/admin Modified Files: blockAdmin.php3 groupAdmin.php3 pollAdmin.php3 storyAdmin.php3 Log Message: small permission changes Index: blockAdmin.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/admin/blockAdmin.php3,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** blockAdmin.php3 11 Nov 2002 22:22:36 -0000 1.11 --- blockAdmin.php3 5 Dec 2002 13:14:59 -0000 1.12 *************** *** 70,73 **** --- 70,80 ---- if ($perm->have_perm("blockPut")) { $content .= $block->putBlock($HTTP_POST_VARS); + + // expire cache for these section_id's + $section_id_ary = $HTTP_POST_VARS['section_id_ary']; + foreach($section_id_ary as $key => $value) { + jpcache_gc('string', "-section_id-" . $value, "100"); + } + } # break; Index: groupAdmin.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/admin/groupAdmin.php3,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** groupAdmin.php3 14 Nov 2002 17:19:20 -0000 1.6 --- groupAdmin.php3 5 Dec 2002 13:14:59 -0000 1.7 *************** *** 67,76 **** break; case "submit": ! $success = $group->saveGroup($HTTP_POST_VARS); ! if($success) { ! $content .= getMessage( pslgetText($group->getMessage())); ! } else { ! $content .= getError( pslgetText($group->getMessage())); ! } if ($perm->have_perm("groupNew")) { $content .= $group->newGroup(); --- 67,78 ---- break; case "submit": ! if ($perm->have_perm("groupSave")) { ! $success = $group->saveGroup($HTTP_POST_VARS); ! if($success) { ! $content .= getMessage( pslgetText($group->getMessage())); ! } else { ! $content .= getError( pslgetText($group->getMessage())); ! } ! } if ($perm->have_perm("groupNew")) { $content .= $group->newGroup(); *************** *** 99,108 **** case "deleteperm": ! $success = $group->deletePermission($permission_id); ! if($success) { ! $content .= getMessage( pslgetText($group->getMessage())); ! } else { ! $content .= getError( pslgetText($group->getMessage())); ! } if ($perm->have_perm("groupNew")) { $content .= $group->newGroup(); --- 101,112 ---- case "deleteperm": ! if ($perm->have_perm("permissionDelete")) { ! $success = $group->deletePermission($permission_id); ! if($success) { ! $content .= getMessage( pslgetText($group->getMessage())); ! } else { ! $content .= getError( pslgetText($group->getMessage())); ! } ! } if ($perm->have_perm("groupNew")) { $content .= $group->newGroup(); *************** *** 119,128 **** break; case "submitperm": ! $success = $group->savePermission($HTTP_POST_VARS); ! if($success) { ! $content .= getMessage( pslgetText($group->getMessage())); ! } else { ! $content .= getError( pslgetText($group->getMessage())); ! } if ($perm->have_perm("groupNew")) { $content .= $group->newGroup(); --- 123,134 ---- break; case "submitperm": ! if ($perm->have_perm("permissionSave")) { ! $success = $group->savePermission($HTTP_POST_VARS); ! if($success) { ! $content .= getMessage( pslgetText($group->getMessage())); ! } else { ! $content .= getError( pslgetText($group->getMessage())); ! } ! } if ($perm->have_perm("groupNew")) { $content .= $group->newGroup(); Index: pollAdmin.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/admin/pollAdmin.php3,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** pollAdmin.php3 11 Nov 2002 22:22:39 -0000 1.12 --- pollAdmin.php3 5 Dec 2002 13:14:59 -0000 1.13 *************** *** 55,58 **** --- 55,62 ---- $content .= getFancybox(210, $_PSL['site_name'] ."Poll", $poll->getPollBooth(clean($HTTP_POST_VARS['question_id'])), "r"); $content .= "</center>"; + + // expire cache for this question_id + jpcache_gc('string', "-question_id-" . $HTTP_POST_VARS['question_id'], "100"); + } else { $content .= getError($poll->message); *************** *** 61,73 **** break; case "delete": ! $content .= getTitlebar ("100%", "Deleting poll"); ! if($poll->deletePoll($question_id)) { ! $content .= getMessage($poll->message); ! } else { ! $content .= getError($poll->message); } case "makecurrent": ! if(!$poll->makeCurrent($question_id)) { ! $content .= getError($poll->message); } default: --- 65,81 ---- break; case "delete": ! if ($perm->have_perm("pollDelete")) { ! $content .= getTitlebar ("100%", "Deleting poll"); ! if($poll->deletePoll($question_id)) { ! $content .= getMessage($poll->message); ! } else { ! $content .= getError($poll->message); ! } } case "makecurrent": ! if ($perm->have_perm("pollPut")) { ! if(!$poll->makeCurrent($question_id)) { ! $content .= getError($poll->message); ! } } default: Index: storyAdmin.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/admin/storyAdmin.php3,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** storyAdmin.php3 22 Nov 2002 19:01:33 -0000 1.16 --- storyAdmin.php3 5 Dec 2002 13:14:59 -0000 1.17 *************** *** 58,61 **** --- 58,66 ---- // expire cache for this story_id jpcache_gc('string', "-story_id-" . $HTTP_POST_VARS['story_id'], "100"); + // expire cache for these section_id's + $section_id_ary = $HTTP_POST_VARS['section_id_ary']; + foreach($section_id_ary as $key => $value) { + jpcache_gc('string', "-section_id-" . $value, "100"); + } } if ($perm->have_perm("storyList")) { |
From: Joe S. <joe...@us...> - 2002-12-05 13:15:02
|
Update of /cvsroot/phpslash/phpslash-ft In directory sc8-pr-cvs1:/tmp/cvs-serv18236/phpslash-ft Modified Files: CHANGES Log Message: small permission changes Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.628 retrieving revision 1.629 diff -C2 -d -r1.628 -r1.629 *** CHANGES 4 Dec 2002 20:27:37 -0000 1.628 --- CHANGES 5 Dec 2002 13:14:58 -0000 1.629 *************** *** 13,16 **** --- 13,20 ---- 9 - Removal of something (kill -9 :) + 2002-December-5 7:00AM CST Joe Stewart <joe...@us...> + [B] - profile.php3, groupAdmin.php3, pollAdmin.php3, storyAdmin.php3, + blockAdmin.php3 - cleaned up some permissions. + 2002-December-4 2:00PM CST Joe Stewart <joe...@us...> [E] - tz_select.php3, test.php3, submission.php3, poll.php3, mailinglist.php3, |
From: Joe S. <joe...@us...> - 2002-12-04 20:28:14
|
Update of /cvsroot/phpslash/phpslash-ft In directory sc8-pr-cvs1:/tmp/cvs-serv1644/phpslash-ft Modified Files: CHANGES Log Message: page_open moved to config Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.627 retrieving revision 1.628 diff -C2 -d -r1.627 -r1.628 *** CHANGES 4 Dec 2002 19:51:25 -0000 1.627 --- CHANGES 4 Dec 2002 20:27:37 -0000 1.628 *************** *** 13,17 **** 9 - Removal of something (kill -9 :) ! 002-December-4 12:00PM CST Joe Stewart <joe...@us...> [BT] - profile.php3, basic/authorProfile.tpl - sync profile template to default skin. --- 13,21 ---- 9 - Removal of something (kill -9 :) ! 2002-December-4 2:00PM CST Joe Stewart <joe...@us...> ! [E] - tz_select.php3, test.php3, submission.php3, poll.php3, mailinglist.php3, ! glossary.php3, comment.php3 - page_open in config. ! ! 2002-December-4 12:00PM CST Joe Stewart <joe...@us...> [BT] - profile.php3, basic/authorProfile.tpl - sync profile template to default skin. |
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory sc8-pr-cvs1:/tmp/cvs-serv1644/phpslash-ft/public_html Modified Files: comment.php3 glossary.php3 login.php3 mailinglist.php3 poll.php3 submission.php3 test.php3 tz_select.php3 Log Message: page_open moved to config Index: comment.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/comment.php3,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** comment.php3 22 Nov 2002 19:01:32 -0000 1.22 --- comment.php3 4 Dec 2002 20:27:41 -0000 1.23 *************** *** 8,12 **** $xsiteobject = pslgetText("Comment Display"); # Defines The META TAG Page Type ! page_open(array("sess"=>"slashSess","auth"=>"slashAuth","perm"=>"slashPerm")); $auth->login_if(!$perm->have_perm('commentView')); --- 8,12 ---- $xsiteobject = pslgetText("Comment Display"); # Defines The META TAG Page Type ! // page_open(array("sess"=>"slashSess","auth"=>"slashAuth","perm"=>"slashPerm")); $auth->login_if(!$perm->have_perm('commentView')); Index: glossary.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/glossary.php3,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** glossary.php3 11 Nov 2002 21:22:58 -0000 1.15 --- glossary.php3 4 Dec 2002 20:27:43 -0000 1.16 *************** *** 8,12 **** $xsiteobject = "Glossary"; // Defines The META TAG Page Type ! page_open(array("sess"=>"slashSess","auth"=>"slashAuth","perm"=>"slashPerm")); /***************************** --- 8,12 ---- $xsiteobject = "Glossary"; // Defines The META TAG Page Type ! // page_open(array("sess"=>"slashSess","auth"=>"slashAuth","perm"=>"slashPerm")); /***************************** Index: login.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/login.php3,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** login.php3 3 Dec 2002 20:27:36 -0000 1.31 --- login.php3 4 Dec 2002 20:27:44 -0000 1.32 *************** *** 10,14 **** $xsiteobject = pslgetText("Administration Page"); #This Defines The META Tag Object Type ! page_open(array("sess"=>"slashSess","auth"=>"slashAuth","perm"=>"slashPerm")); if (isset($HTTP_POST_VARS['cancel'])) { --- 10,14 ---- $xsiteobject = pslgetText("Administration Page"); #This Defines The META Tag Object Type ! // page_open(array("sess"=>"slashSess","auth"=>"slashAuth","perm"=>"slashPerm")); if (isset($HTTP_POST_VARS['cancel'])) { Index: mailinglist.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/mailinglist.php3,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** mailinglist.php3 11 Nov 2002 21:22:58 -0000 1.9 --- mailinglist.php3 4 Dec 2002 20:27:44 -0000 1.10 *************** *** 6,12 **** $pagetitle = pslgetText("Mailing List Admin"); // header title ! $xsiteobject = pslgetText("Administration"); // Defines The META TAG Page Type ! page_open(array("sess"=>"slashSess","auth"=>"slashAuth","perm"=>"slashPerm")); /***************************** --- 6,12 ---- $pagetitle = pslgetText("Mailing List Admin"); // header title ! $xsiteobject = pslgetText("Administration"); // Defines The META TAG Page Type ! // page_open(array("sess"=>"slashSess","auth"=>"slashAuth","perm"=>"slashPerm")); /***************************** Index: poll.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/poll.php3,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** poll.php3 11 Nov 2002 21:22:58 -0000 1.18 --- poll.php3 4 Dec 2002 20:27:45 -0000 1.19 *************** *** 8,12 **** $xsiteobject = pslgetText("Poll Booth"); //Defines The META TAG Page Type ! page_open(array("sess"=>"slashSess","auth"=>"slashAuth","perm"=>"slashPerm")); $ary = array(); --- 8,12 ---- $xsiteobject = pslgetText("Poll Booth"); //Defines The META TAG Page Type ! // page_open(array("sess"=>"slashSess","auth"=>"slashAuth","perm"=>"slashPerm")); $ary = array(); Index: submission.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/submission.php3,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** submission.php3 11 Nov 2002 22:42:19 -0000 1.14 --- submission.php3 4 Dec 2002 20:27:46 -0000 1.15 *************** *** 7,11 **** $xsiteobject = pslgetText("Submission");#Defines The META TAG Page Type ! page_open(array("sess"=>"slashSess","auth"=>"slashAuth","perm"=>"slashPerm")); $auth->login_if(!$perm->have_perm('submissionNew')); --- 7,11 ---- $xsiteobject = pslgetText("Submission");#Defines The META TAG Page Type ! // page_open(array("sess"=>"slashSess","auth"=>"slashAuth","perm"=>"slashPerm")); $auth->login_if(!$perm->have_perm('submissionNew')); Index: test.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/test.php3,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** test.php3 11 Nov 2002 21:22:58 -0000 1.6 --- test.php3 4 Dec 2002 20:27:47 -0000 1.7 *************** *** 25,28 **** --- 25,29 ---- if (@is_readable("config.php3")) { + $cachetimeout=-1; include("config.php3"); } else { *************** *** 69,73 **** case 'phplib-slash': ! page_open(array("sess"=>"slashSess","auth"=>"slashAuth","perm"=>"slashPerm")); // s is a per session variable, u is a per user variable. --- 70,74 ---- case 'phplib-slash': ! // page_open(array("sess"=>"slashSess","auth"=>"slashAuth","perm"=>"slashPerm")); // s is a per session variable, u is a per user variable. Index: tz_select.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/tz_select.php3,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tz_select.php3 11 Nov 2002 21:22:58 -0000 1.2 --- tz_select.php3 4 Dec 2002 20:27:48 -0000 1.3 *************** *** 2,8 **** --- 2,10 ---- require("config.php3"); + /* page_open(array('sess' => 'slashSess', 'auth' => 'slashAuth', 'perm' => 'slashPerm')); + */ slashhead(pslgetText("Select Time Zone"),pslgetText("Customization")); if ($HTTP_GET_VARS['submit']) { |
From: Joe S. <joe...@us...> - 2002-12-04 19:51:30
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory sc8-pr-cvs1:/tmp/cvs-serv31859/phpslash-ft/class Modified Files: Block.class Block_admin.class Block_i.class slashAuthCR.class Log Message: parse blocks for each skin Index: Block.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Block.class,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Block.class 21 Nov 2002 18:59:04 -0000 1.21 --- Block.class 4 Dec 2002 19:51:25 -0000 1.22 *************** *** 31,35 **** $this->psl = $_PSL; ! $this->perm = $perm; /* Array to store block info in */ --- 31,35 ---- $this->psl = $_PSL; ! $this->perm = &$perm; /* Array to store block info in */ *************** *** 473,482 **** $this->parsedData = addslashes($this->parsedData); $id = $this->block_info["id"]; ! /* Store in db */ ! $newdate=time(); ! $query = "UPDATE psl_block ! SET cache_data = '$this->parsedData', ! date_issued = $newdate ! WHERE id = '$id'"; debug("Block::storeParsed::Update query:", $query); $this->db->query($query); --- 473,498 ---- $this->parsedData = addslashes($this->parsedData); $id = $this->block_info["id"]; ! ! if(($this->psl['defaultskin'] == $this->psl['skin']) && ! ($this->psl['language'] == $this->psl['lang'])) { ! /* Store in db */ ! $newdate=time(); ! $query = "UPDATE psl_block ! SET cache_data = '$this->parsedData', ! date_issued = $newdate ! WHERE id = '$id'"; ! } else { ! ! $block_options = $this->block_info["block_options"]; ! $lang = $this->psl['lang']; ! $skin = $this->psl['skin']; ! $block_options['cache_data'][$lang][$skin]['cache_data'] = $this->block_info["cache_data"]; ! $block_options['cache_data'][$lang][$skin]['last_update'] = time(); ! $serial_options = addslashes(serialize($block_options)); ! /* Store in db */ ! $query = "UPDATE psl_block ! SET block_options = '$serial_options' ! WHERE id = '$id'"; ! } debug("Block::storeParsed::Update query:", $query); $this->db->query($query); *************** *** 570,592 **** while ($db->next_record()) { ! $this->block_ary[$i] = $db->Record; ! $this->block_ary[$i]['block_options'] = unserialize($db->Record["block_options"]); ! ! $last = intval($this->block_ary[$i]["last_update"]); $update = intval($this->block_ary[$i]["expire_length"]); $next = $last + $update; $timestamp = time(); ! // update cache? if yes doParse if ($timestamp > $next) { ! // if (($timestamp > $next) && ($update != 0)) { $this->block_info = $this->block_ary[$i]; ! if ($this->doParse('1')) { ! $this->block_ary[$i]['cache_data'] = $this->block_info["cache_data"]; ! } ! } ! $i++; } return $this->block_ary; --- 586,617 ---- while ($db->next_record()) { ! $this->block_ary[$i] = $db->Record; ! $this->block_ary[$i]['block_options'] = unserialize($db->Record["block_options"]); ! if(($this->psl['defaultskin'] == $this->psl['skin']) && ! ($this->psl['language'] == $this->psl['lang'])) { ! $last = intval($this->block_ary[$i]["last_update"]); ! } else { ! $skin = $this->psl['skin']; ! $lang = $this->psl['lang']; ! if( !empty($this->block_ary[$i]['block_options']['cache_data'][$lang][$skin]['cache_data'])) { ! $this->block_ary[$i]['cache_data'] = $this->block_ary[$i]['block_options']['cache_data'][$lang][$skin]['cache_data']; ! $last = intval($this->block_ary[$i]['block_options']['cache_data'][$lang][$skin]['last_update']); ! } ! } $update = intval($this->block_ary[$i]["expire_length"]); $next = $last + $update; $timestamp = time(); ! // update cache? if yes doParse if ($timestamp > $next) { ! // if (($timestamp > $next) && ($update != 0)) { $this->block_info = $this->block_ary[$i]; ! if ($this->doParse('1')) { ! $this->block_ary[$i]['cache_data'] = $this->block_info["cache_data"]; ! } ! } ! $i++; } return $this->block_ary; Index: Block_admin.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Block_admin.class,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Block_admin.class 24 Oct 2002 18:12:10 -0000 1.3 --- Block_admin.class 4 Dec 2002 19:51:25 -0000 1.4 *************** *** 180,183 **** --- 180,184 ---- $temparray=$this->block_info["block_options"]; if (is_array($temparray)) { + unset($temparray['cache_data']); reset($temparray); } Index: Block_i.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Block_i.class,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Block_i.class 31 Oct 2002 21:38:50 -0000 1.21 --- Block_i.class 4 Dec 2002 19:51:25 -0000 1.22 *************** *** 173,179 **** break; ! case "perms": // remove perms from array $ary["block_options"]["perms"] = ''; break; --- 173,184 ---- break; ! case "perms": // remove perms from array $ary["block_options"]["perms"] = ''; + break; + + case "cache_data": + // remove cache_data from array + $ary["block_options"]["cache_data"] = ''; break; Index: slashAuthCR.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/slashAuthCR.class,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** slashAuthCR.class 3 Dec 2002 20:27:36 -0000 1.32 --- slashAuthCR.class 4 Dec 2002 19:51:25 -0000 1.33 *************** *** 52,56 **** // use language preference ! if(isset($this->auth['preferences']['lang'])) { $_PSL['languagefile'] = setLang($this->auth['preferences']['lang']); $_PSL['templatedir'] = setLangTpl($this->auth['preferences']['lang']); --- 52,57 ---- // use language preference ! if ((isset($this->auth['preferences']['lang'])) && ! ($this->psl['language'] != $this->auth['preferences']['lang']) ) { $_PSL['languagefile'] = setLang($this->auth['preferences']['lang']); $_PSL['templatedir'] = setLangTpl($this->auth['preferences']['lang']); *************** *** 58,62 **** // use skin preference ! if(isset($this->auth['preferences']['skin'])) { $_PSL['templatedir'] = setSkinTpl($this->auth['preferences']['skin']); } --- 59,65 ---- // use skin preference ! // if(isset($this->auth['preferences']['skin'])) { ! if ((isset($this->auth['preferences']['skin'])) && ! ($this->psl['defaultskin'] != $this->auth['preferences']['skin'])){ $_PSL['templatedir'] = setSkinTpl($this->auth['preferences']['skin']); } *************** *** 137,140 **** --- 140,158 ---- if(!empty($cookie_ary['preferences'])) { $this->auth['preferences'] = $cookie_ary['preferences']; + // use preferences + + // use language preference + if ((isset($this->auth['preferences']['lang'])) && + ($this->psl['language'] != $this->auth['preferences']['lang']) ) { + $this->psl['languagefile'] = setLang($this->auth['preferences']['lang']); + $this->psl['templatedir'] = setLangTpl($this->auth['preferences']['lang']); + } + + // use skin preference + if ((isset($this->auth['preferences']['skin'])) && + ($this->psl['defaultskin'] != $this->auth['preferences']['skin'])){ + $this->psl['templatedir'] = setSkinTpl($this->auth['preferences']['skin']); + } + } return false; |
From: Joe S. <joe...@us...> - 2002-12-04 19:51:28
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory sc8-pr-cvs1:/tmp/cvs-serv31859/phpslash-ft/public_html Modified Files: profile.php3 Log Message: parse blocks for each skin Index: profile.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/profile.php3,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** profile.php3 11 Nov 2002 21:22:58 -0000 1.5 --- profile.php3 4 Dec 2002 19:51:25 -0000 1.6 *************** *** 3,6 **** --- 3,9 ---- /* $Id$ */ + // don't cache this page + $cachetimeout=-1; + require("config.php3"); *************** *** 8,12 **** $xsiteobject = pslgetText("Profile"); // Defines The META TAG Page Type ! page_open(array("sess"=>"slashSess","auth"=>"slashAuth","perm"=>"slashPerm")); /***************************** --- 11,15 ---- $xsiteobject = pslgetText("Profile"); // Defines The META TAG Page Type ! // page_open(array("sess"=>"slashSess","auth"=>"slashAuth","perm"=>"slashPerm")); /***************************** *************** *** 58,64 **** if($author->saveProfile($ary)) { $content .= getMessage("Profile Updated"); ! } else { $content .= getError("Profile not updated"); ! } case "edit": default: --- 61,70 ---- if($author->saveProfile($ary)) { $content .= getMessage("Profile Updated"); ! ! // expire cache for this session ! jpcache_gc('string', "-slashSess-" . $sess->id, "100"); ! } else { $content .= getError("Profile not updated"); ! } case "edit": default: |
From: Joe S. <joe...@us...> - 2002-12-04 19:51:28
|
Update of /cvsroot/phpslash/phpslash-ft In directory sc8-pr-cvs1:/tmp/cvs-serv31859/phpslash-ft Modified Files: CHANGES Log Message: parse blocks for each skin Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.626 retrieving revision 1.627 diff -C2 -d -r1.626 -r1.627 *** CHANGES 3 Dec 2002 20:27:34 -0000 1.626 --- CHANGES 4 Dec 2002 19:51:25 -0000 1.627 *************** *** 13,21 **** 9 - Removal of something (kill -9 :) ! 2002-December-26 2:00PM CST Joe Stewart <joe...@us...> [E] - config.php3, config-dist.php3, login.php3, slashAuthCR.class - expire session cache on login and logout. ! 2002-December-26 12:00PM CST Joe Stewart <joe...@us...> [E] - config.php3, config-dist.php3 - further tweaking jpcache config. Known issue: cache use is not compatible with GET fallback or --- 13,29 ---- 9 - Removal of something (kill -9 :) ! 002-December-4 12:00PM CST Joe Stewart <joe...@us...> ! [BT] - profile.php3, basic/authorProfile.tpl - sync profile template to ! default skin. ! slashAuthCR.class - update skin pref on first page view. ! functions.inc - setLang sets the current lang. ! Block.class, Block_i.class, Block_admin.class - parse blocks for each ! skin. ! ! 2002-December-2 2:00PM CST Joe Stewart <joe...@us...> [E] - config.php3, config-dist.php3, login.php3, slashAuthCR.class - expire session cache on login and logout. ! 2002-December-2 12:00PM CST Joe Stewart <joe...@us...> [E] - config.php3, config-dist.php3 - further tweaking jpcache config. Known issue: cache use is not compatible with GET fallback or |
From: Joe S. <joe...@us...> - 2002-12-04 19:51:28
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic In directory sc8-pr-cvs1:/tmp/cvs-serv31859/phpslash-ft/public_html/templates/en/basic Modified Files: authorProfile.tpl Log Message: parse blocks for each skin Index: authorProfile.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic/authorProfile.tpl,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** authorProfile.tpl 11 Nov 2002 15:35:39 -0000 1.6 --- authorProfile.tpl 4 Dec 2002 19:51:25 -0000 1.7 *************** *** 10,14 **** <tr> <td class="descr">Name <span class="must">*</span></td> ! <td><input type="text" name="author_name" value="{NAME}" size="20" /></td> </tr> <tr> --- 10,14 ---- <tr> <td class="descr">Name <span class="must">*</span></td> ! <td class="descr"><input type="hidden" name="author_name" value="{NAME}" size="20" />{NAME}</td> </tr> <tr> |
From: Joe S. <joe...@us...> - 2002-12-03 20:27:42
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory sc8-pr-cvs1:/tmp/cvs-serv6335/phpslash-ft/public_html Modified Files: config.php3 config-dist.php3 login.php3 Log Message: delete session cache on login and logout Index: config.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/config.php3,v retrieving revision 1.168 retrieving revision 1.169 diff -C2 -d -r1.168 -r1.169 *** config.php3 3 Dec 2002 17:50:41 -0000 1.168 --- config.php3 3 Dec 2002 20:27:35 -0000 1.169 *************** *** 22,32 **** if(array_key_exists('JPCACHE_TYPE', $GLOBALS)) { $varkey = ''; ! if( (!empty($HTTP_COOKIE_VARS['slashSess'])) || ! (!empty($HTTP_COOKIE_VARS['user_info'])) ) { $varkey = md5("POST=" . serialize($HTTP_POST_VARS) . " GET=" . serialize($HTTP_GET_VARS) . " COOKIE=" . serialize($HTTP_COOKIE_VARS)); } else { // $scriptkey = "-uid-nobody"; ! $scriptkey = ""; if(!empty($HTTP_COOKIE_VARS['skin'])) { $scriptkey .= "-skin-". $HTTP_COOKIE_VARS['skin']; --- 22,33 ---- if(array_key_exists('JPCACHE_TYPE', $GLOBALS)) { $varkey = ''; ! if (!empty($HTTP_COOKIE_VARS['slashSess'])) { ! $scriptkey = "-slashSess-". $HTTP_COOKIE_VARS['slashSess']; ! } elseif (!empty($HTTP_COOKIE_VARS['user_info']) ) { $varkey = md5("POST=" . serialize($HTTP_POST_VARS) . " GET=" . serialize($HTTP_GET_VARS) . " COOKIE=" . serialize($HTTP_COOKIE_VARS)); } else { // $scriptkey = "-uid-nobody"; ! $scriptkey = ''; if(!empty($HTTP_COOKIE_VARS['skin'])) { $scriptkey .= "-skin-". $HTTP_COOKIE_VARS['skin']; *************** *** 182,191 **** // cache invocation $varkey = ''; ! if( (!empty($HTTP_COOKIE_VARS['slashSess'])) || ! (!empty($HTTP_COOKIE_VARS['user_info'])) ) { $varkey = md5("POST=" . serialize($HTTP_POST_VARS) . " GET=" . serialize($HTTP_GET_VARS) . " COOKIE=" . serialize($HTTP_COOKIE_VARS)); } else { // $scriptkey = "-uid-nobody"; if(!empty($HTTP_COOKIE_VARS['skin'])) { $scriptkey .= "-skin-". $_PSL['skin']; --- 183,194 ---- // cache invocation $varkey = ''; ! if (!empty($HTTP_COOKIE_VARS['slashSess'])) { ! $scriptkey = "-slashSess-". $HTTP_COOKIE_VARS['slashSess']; ! } elseif (!empty($HTTP_COOKIE_VARS['user_info']) ) { $varkey = md5("POST=" . serialize($HTTP_POST_VARS) . " GET=" . serialize($HTTP_GET_VARS) . " COOKIE=" . serialize($HTTP_COOKIE_VARS)); } else { // $scriptkey = "-uid-nobody"; + $scriptkey = ''; if(!empty($HTTP_COOKIE_VARS['skin'])) { $scriptkey .= "-skin-". $_PSL['skin']; Index: config-dist.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/config-dist.php3,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** config-dist.php3 3 Dec 2002 17:50:40 -0000 1.19 --- config-dist.php3 3 Dec 2002 20:27:35 -0000 1.20 *************** *** 30,40 **** if(array_key_exists('JPCACHE_TYPE', $GLOBALS)) { $varkey = ''; ! if( (!empty($HTTP_COOKIE_VARS['slashSess'])) || ! (!empty($HTTP_COOKIE_VARS['user_info'])) ) { $varkey = md5("POST=" . serialize($HTTP_POST_VARS) . " GET=" . serialize($HTTP_GET_VARS) . " COOKIE=" . serialize($HTTP_COOKIE_VARS)); } else { // $scriptkey = "-uid-nobody"; ! $scriptkey = ""; if(!empty($HTTP_COOKIE_VARS['skin'])) { $scriptkey .= "-skin-". $HTTP_COOKIE_VARS['skin']; --- 30,41 ---- if(array_key_exists('JPCACHE_TYPE', $GLOBALS)) { $varkey = ''; ! if (!empty($HTTP_COOKIE_VARS['slashSess'])) { ! $scriptkey = "-slashSess-". $HTTP_COOKIE_VARS['slashSess']; ! } elseif (!empty($HTTP_COOKIE_VARS['user_info']) ) { $varkey = md5("POST=" . serialize($HTTP_POST_VARS) . " GET=" . serialize($HTTP_GET_VARS) . " COOKIE=" . serialize($HTTP_COOKIE_VARS)); } else { // $scriptkey = "-uid-nobody"; ! $scriptkey = ''; if(!empty($HTTP_COOKIE_VARS['skin'])) { $scriptkey .= "-skin-". $HTTP_COOKIE_VARS['skin']; *************** *** 187,196 **** // cache invocation $varkey = ''; ! if( (!empty($HTTP_COOKIE_VARS['slashSess'])) || ! (!empty($HTTP_COOKIE_VARS['user_info'])) ) { $varkey = md5("POST=" . serialize($HTTP_POST_VARS) . " GET=" . serialize($HTTP_GET_VARS) . " COOKIE=" . serialize($HTTP_COOKIE_VARS)); } else { // $scriptkey = "-uid-nobody"; if(!empty($HTTP_COOKIE_VARS['skin'])) { $scriptkey .= "-skin-". $_PSL['skin']; --- 188,199 ---- // cache invocation $varkey = ''; ! if (!empty($HTTP_COOKIE_VARS['slashSess'])) { ! $scriptkey = "-slashSess-". $HTTP_COOKIE_VARS['slashSess']; ! } elseif (!empty($HTTP_COOKIE_VARS['user_info']) ) { $varkey = md5("POST=" . serialize($HTTP_POST_VARS) . " GET=" . serialize($HTTP_GET_VARS) . " COOKIE=" . serialize($HTTP_COOKIE_VARS)); } else { // $scriptkey = "-uid-nobody"; + $scriptkey = ''; if(!empty($HTTP_COOKIE_VARS['skin'])) { $scriptkey .= "-skin-". $_PSL['skin']; Index: login.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/login.php3,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** login.php3 23 Nov 2002 13:22:20 -0000 1.30 --- login.php3 3 Dec 2002 20:27:36 -0000 1.31 *************** *** 27,30 **** --- 27,34 ---- } } + + // expire cache for this session + jpcache_gc('string', "-slashSess-" . $sess->id, "100"); + $username = $auth->auth['uname']; $sess->delete(); // may be needed for phplib session4.inc |
From: Joe S. <joe...@us...> - 2002-12-03 20:27:42
|
Update of /cvsroot/phpslash/phpslash-ft In directory sc8-pr-cvs1:/tmp/cvs-serv6335/phpslash-ft Modified Files: CHANGES Log Message: delete session cache on login and logout Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.625 retrieving revision 1.626 diff -C2 -d -r1.625 -r1.626 *** CHANGES 3 Dec 2002 17:47:39 -0000 1.625 --- CHANGES 3 Dec 2002 20:27:34 -0000 1.626 *************** *** 13,16 **** --- 13,20 ---- 9 - Removal of something (kill -9 :) + 2002-December-26 2:00PM CST Joe Stewart <joe...@us...> + [E] - config.php3, config-dist.php3, login.php3, slashAuthCR.class - expire + session cache on login and logout. + 2002-December-26 12:00PM CST Joe Stewart <joe...@us...> [E] - config.php3, config-dist.php3 - further tweaking jpcache config. |
From: Joe S. <joe...@us...> - 2002-12-03 20:27:42
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory sc8-pr-cvs1:/tmp/cvs-serv6335/phpslash-ft/class Modified Files: slashAuthCR.class Log Message: delete session cache on login and logout Index: slashAuthCR.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/slashAuthCR.class,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** slashAuthCR.class 11 Nov 2002 15:35:39 -0000 1.31 --- slashAuthCR.class 3 Dec 2002 20:27:36 -0000 1.32 *************** *** 116,120 **** function auth_preauth() { ! global $HTTP_COOKIE_VARS; // debug("auth", "preauth"); --- 116,120 ---- function auth_preauth() { ! global $HTTP_COOKIE_VARS, $sess; // debug("auth", "preauth"); *************** *** 153,156 **** --- 153,160 ---- $uid = $this->db->Record["author_id"]; $this->auth["perm"] = $this->get_userperms($uid); + + // expire cache for this session + jpcache_gc('string', "-slashSess-" . $sess->id, "100"); + return $uid; } else { *************** *** 174,178 **** function auth_validatelogin() { ! global $HTTP_POST_VARS, $HTTP_GET_VARS, $saved_get, $saved_post, $challenge; if(empty($HTTP_POST_VARS)) { --- 178,182 ---- function auth_validatelogin() { ! global $HTTP_POST_VARS, $HTTP_GET_VARS, $saved_get, $saved_post, $challenge, $sess; if(empty($HTTP_POST_VARS)) { *************** *** 305,308 **** --- 309,315 ---- $challenge = ''; + + // expire cache for this session + jpcache_gc('string', "-slashSess-" . $sess->id, "100"); return $uid; |
From: Joe S. <joe...@us...> - 2002-12-03 17:50:44
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory sc8-pr-cvs1:/tmp/cvs-serv2397/phpslash-ft/public_html Modified Files: config-dist.php3 config.php3 Log Message: jpcache tweaking Index: config-dist.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/config-dist.php3,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** config-dist.php3 3 Dec 2002 17:47:39 -0000 1.18 --- config-dist.php3 3 Dec 2002 17:50:40 -0000 1.19 *************** *** 11,15 **** $psl_inifile = "/var/www/sandbox/config.ini.php3"; ! // end of require configuration. config.ini.php3 contains the phpSlash // configuration variables. --- 11,15 ---- $psl_inifile = "/var/www/sandbox/config.ini.php3"; ! // end of required configuration. config.ini.php3 contains the phpSlash // configuration variables. Index: config.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/config.php3,v retrieving revision 1.167 retrieving revision 1.168 diff -C2 -d -r1.167 -r1.168 *** config.php3 3 Dec 2002 17:47:40 -0000 1.167 --- config.php3 3 Dec 2002 17:50:41 -0000 1.168 *************** *** 15,25 **** like this, but you need to be sure to close it like so: */ - // Specify full path to ini file - $psl_inifile = "config.ini.php3"; - - // end of required configuration. config.ini.php3 contains the phpSlash - // configuration variables. - - /* After phpSlash is configured, the jpcache-config.php file and the varkey below can be configured to further optimize the cache system. --- 15,18 ---- |
From: Joe S. <joe...@us...> - 2002-12-03 17:47:43
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory sc8-pr-cvs1:/tmp/cvs-serv29509/phpslash-ft/public_html Modified Files: config-dist.php3 config.php3 Log Message: jpcache tweaking Index: config-dist.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/config-dist.php3,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** config-dist.php3 25 Nov 2002 00:34:26 -0000 1.17 --- config-dist.php3 3 Dec 2002 17:47:39 -0000 1.18 *************** *** 8,11 **** --- 8,17 ---- */ + // Specify full path to ini file + $psl_inifile = "/var/www/sandbox/config.ini.php3"; + + // end of require configuration. config.ini.php3 contains the phpSlash + // configuration variables. + // This is a comment, it spans one line *************** *** 19,54 **** This is not needed to enable the cache initially. */ // require "/path/to/jpcache.php"; ! if(array_key_exists('JPCACHE_VERSION', $GLOBALS)) { ! if ( (empty($HTTP_COOKIE_VARS['slashSess'])) AND ! (empty($HTTP_COOKIE_VARS['user_info'])) AND ! (empty($HTTP_COOKIE_VARS['skin'])) ) { ! ! $varkey = "-uid-nobody-lang-en-skin-basic"; ! if( !empty($HTTP_COOKIE_VARS['TZ'])) { ! $varkey .= "-TZ-". $HTTP_COOKIE_VARS['TZ']; ! } else { ! $varkey .= "-TZ-America-Chicago"; ! } ! foreach( $HTTP_GET_VARS as $key => $value) { ! $varkey .= "-". $key ."-". $value; ! } ! if ((empty($HTTP_GET_VARS['section'])) AND ! (empty($HTTP_GET_VARS['section_id']))){ ! $varkey .= "-section_id-3"; ! } ! $key = str_replace("/","-", $HTTP_SERVER_VARS['PHP_SELF'].$varkey); ! if($GLOBALS['JPCACHE_IGNORE_DOMAIN'] == 0) { ! $key = str_replace(".","-", $HTTP_SERVER_VARS['HTTP_HOST'] .$key); ! } ! jpcache_start('',$key); } } $_PSL = array(); // parse the ini configuration file into the $_PSL array // Specify full path to ini file ! $_PSL = parse_ini_file("config.ini.php3", TRUE); $_PSL['version'] = '0.6.5'; --- 25,75 ---- This is not needed to enable the cache initially. */ + // require "/path/to/jpcache.php"; ! ! if(array_key_exists('JPCACHE_TYPE', $GLOBALS)) { ! $varkey = ''; ! if( (!empty($HTTP_COOKIE_VARS['slashSess'])) || ! (!empty($HTTP_COOKIE_VARS['user_info'])) ) { ! $varkey = md5("POST=" . serialize($HTTP_POST_VARS) . " GET=" . serialize($HTTP_GET_VARS) . " COOKIE=" . serialize($HTTP_COOKIE_VARS)); ! } else { ! ! // $scriptkey = "-uid-nobody"; ! $scriptkey = ""; ! if(!empty($HTTP_COOKIE_VARS['skin'])) { ! $scriptkey .= "-skin-". $HTTP_COOKIE_VARS['skin']; ! } ! } ! $lang_ary = split( "[,;]", $HTTP_ACCEPT_LANGUAGE); ! if(!empty($lang_ary[0])) { ! $scriptkey .= "-lang-". $lang_ary[0]; ! // } else { ! // $scriptkey .= "-lang-blank"; ! } ! if( !empty($HTTP_COOKIE_VARS['TZ'])) { ! $scriptkey .= "-TZ-". $HTTP_COOKIE_VARS['TZ']; ! // } else { ! // $scriptkey .= "-TZ-America-Chicago"; ! } ! foreach( $HTTP_GET_VARS as $key => $value) { ! $scriptkey .= "-". $key ."-". $value; ! } ! if ((empty($HTTP_GET_VARS['section'])) AND ! (empty($HTTP_GET_VARS['section_id']))){ ! $scriptkey .= "-section_id-3"; } + $scriptkey = preg_replace("'/|:|\\|\*|<|>|\|'","-", $HTTP_SERVER_VARS['PHP_SELF'].$scriptkey); + if($GLOBALS['JPCACHE_IGNORE_DOMAIN'] == 0) { + $scriptkey = str_replace(".","-", $HTTP_SERVER_VARS['HTTP_HOST'] .$scriptkey); + } + jpcache_start('',$scriptkey, $varkey); } + $_PSL = array(); // parse the ini configuration file into the $_PSL array // Specify full path to ini file ! $_PSL = parse_ini_file($psl_inifile, TRUE); $_PSL['version'] = '0.6.5'; *************** *** 107,111 **** } ! if(empty($GLOBALS['JPCACHE_VERSION'])) { // jpcachedir -> the full directory path to the jpcache scripts. --- 128,133 ---- } ! // begin built-in jpcache ! if(empty($GLOBALS['JPCACHE_TYPE'])) { // jpcachedir -> the full directory path to the jpcache scripts. *************** *** 114,119 **** } - - // $JPCACHE_TYPE = "file"; // $JPCACHE_TYPE = "mysql"; --- 136,139 ---- *************** *** 121,128 **** $JPCACHE_TYPE = "phplib"; - - /** ! * General configuration options. */ $JPCACHE_TIME = 900; // Default number of seconds to cache a page --- 141,146 ---- $JPCACHE_TYPE = "phplib"; /** ! * General jpcache configuration options. */ $JPCACHE_TIME = 900; // Default number of seconds to cache a page *************** *** 159,195 **** // first if this works on your mySQL! ! // Standard functions require $_PSL['jpcachedir']. "/jpcache-main.php"; ! // Type specific implementations require $_PSL['jpcachedir'] ."/type/$JPCACHE_TYPE.php"; ! ! if ( (empty($HTTP_COOKIE_VARS['slashSess'])) AND ! (empty($HTTP_COOKIE_VARS['user_info'])) AND ! (empty($HTTP_COOKIE_VARS['skin'])) ) { ! ! $varkey = "-uid-nobody-lang-". $_PSL['language']."-skin-". $_PSL['defaultskin']; ! if( !empty($HTTP_COOKIE_VARS['TZ'])) { ! $varkey .= "-TZ-". $HTTP_COOKIE_VARS['TZ']; ! } else { ! $varkey .= "-TZ-". $_PSL['timezone']['name']; ! } ! foreach( $HTTP_GET_VARS as $key => $value) { ! $varkey .= "-". $key ."-". $value; ! } ! if ((empty($HTTP_GET_VARS['section'])) AND ! (empty($HTTP_GET_VARS['section_id']))){ ! $varkey .= "-section_id-". $_PSL['home_section_id']; ! } ! $key = str_replace("/","-", $_PSL['phpself'].$varkey); ! if($GLOBALS['JPCACHE_IGNORE_DOMAIN'] == 0) { ! $key = str_replace(".","-", $HTTP_SERVER_VARS['HTTP_HOST'] .$key); } ! jpcache_start('',$key); } ! } ! // end of jpcache configuration // 1.11.4) Other Variables... --- 177,228 ---- // first if this works on your mySQL! ! // Standard jpcache functions require $_PSL['jpcachedir']. "/jpcache-main.php"; ! // Type specific jpcache implementations require $_PSL['jpcachedir'] ."/type/$JPCACHE_TYPE.php"; ! // end of jpcache configuration ! ! // cache invocation ! $varkey = ''; ! if( (!empty($HTTP_COOKIE_VARS['slashSess'])) || ! (!empty($HTTP_COOKIE_VARS['user_info'])) ) { ! $varkey = md5("POST=" . serialize($HTTP_POST_VARS) . " GET=" . serialize($HTTP_GET_VARS) . " COOKIE=" . serialize($HTTP_COOKIE_VARS)); ! } else { ! ! // $scriptkey = "-uid-nobody"; ! if(!empty($HTTP_COOKIE_VARS['skin'])) { ! $scriptkey .= "-skin-". $_PSL['skin']; } ! } ! $lang_ary = split( "[,;]", $HTTP_ACCEPT_LANGUAGE); ! if(!empty($lang_ary[0])) { ! $scriptkey .= "-lang-". $lang_ary[0]; ! // } else { ! // $scriptkey .= "-lang-blank"; } ! if( !empty($HTTP_COOKIE_VARS['TZ'])) { ! $scriptkey .= "-TZ-". $HTTP_COOKIE_VARS['TZ']; ! } else { ! $scriptkey .= "-TZ-". $_PSL['timezone']['name']; ! } ! foreach( $HTTP_GET_VARS as $key => $value) { ! $scriptkey .= "-". $key ."-". $value; ! } ! if ((empty($HTTP_GET_VARS['section'])) AND ! (empty($HTTP_GET_VARS['section_id']))){ ! $scriptkey .= "-section_id-". $_PSL['home_section_id']; ! } ! // not too goofy key names ! $scriptkey = preg_replace("'/|:|\\|\*|<|>|\|'","-", $_PSL['phpself'].$scriptkey); ! if($GLOBALS['JPCACHE_IGNORE_DOMAIN'] == 0) { ! $scriptkey = str_replace(".","-", $HTTP_SERVER_VARS['HTTP_HOST'] .$scriptkey); ! } ! jpcache_start('',$scriptkey, $varkey); ! // end of jpcache invocation ! ! } // end of built-in jpcache portion // 1.11.4) Other Variables... *************** *** 556,575 **** 'auth' => 'slashAuth', 'perm' => 'slashPerm')); - - if (( array_key_exists('slashSess', $HTTP_COOKIE_VARS)) AND - (array_key_exists('JPCACHE_TYPE', $GLOBALS)) ) { - $varkey = "-uid-".$auth->auth['uid']."-lang-". $_PSL['language']."-skin-". $_PSL['skin']; - if( !empty($HTTP_COOKIE_VARS['TZ'])) { - $varkey .= "-TZ-". $HTTP_COOKIE_VARS['TZ']; - } - foreach( $ary as $key => $value) { - $varkey .= "-". $key ."-". $value; - } - $key = str_replace("/","-", $_PSL['phpself'].$varkey); - if($GLOBALS['JPCACHE_IGNORE_DOMAIN'] == 0) { - $key = str_replace(".","-", $HTTP_SERVER_VARS['HTTP_HOST'] .$key); - } - jpcache_start('',$key); - } /* ============= Things to deprecate ============= */ --- 589,592 ---- Index: config.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/config.php3,v retrieving revision 1.166 retrieving revision 1.167 diff -C2 -d -r1.166 -r1.167 *** config.php3 26 Nov 2002 16:19:36 -0000 1.166 --- config.php3 3 Dec 2002 17:47:40 -0000 1.167 *************** *** 14,18 **** /* This is a comment as well, it can span multiple lines like this, but you need to be sure to close it like so: */ ! /* After phpSlash is configured, the jpcache-config.php file and the varkey below can be configured to further optimize the cache system. --- 14,25 ---- /* This is a comment as well, it can span multiple lines like this, but you need to be sure to close it like so: */ ! ! // Specify full path to ini file ! $psl_inifile = "config.ini.php3"; ! ! // end of required configuration. config.ini.php3 contains the phpSlash ! // configuration variables. ! ! /* After phpSlash is configured, the jpcache-config.php file and the varkey below can be configured to further optimize the cache system. *************** *** 20,49 **** */ // require "/path/to/jpcache.php"; ! if(array_key_exists('JPCACHE_VERSION', $GLOBALS)) { ! if ( (empty($HTTP_COOKIE_VARS['slashSess'])) AND ! (empty($HTTP_COOKIE_VARS['user_info'])) AND ! (empty($HTTP_COOKIE_VARS['skin'])) ) { ! ! $varkey = "-uid-nobody-lang-en-skin-basic"; ! if( !empty($HTTP_COOKIE_VARS['TZ'])) { ! $varkey .= "-TZ-". $HTTP_COOKIE_VARS['TZ']; ! } else { ! $varkey .= "-TZ-America-Chicago"; ! } ! foreach( $HTTP_GET_VARS as $key => $value) { ! $varkey .= "-". $key ."-". $value; ! } ! if ((empty($HTTP_GET_VARS['section'])) AND ! (empty($HTTP_GET_VARS['section_id']))){ ! $varkey .= "-section_id-3"; ! } ! $key = str_replace("/","-", $HTTP_SERVER_VARS['PHP_SELF'].$varkey); ! if($GLOBALS['JPCACHE_IGNORE_DOMAIN'] == 0) { ! $key = str_replace(".","-", $HTTP_SERVER_VARS['HTTP_HOST'] .$key); ! } ! jpcache_start('',$key); } } $_PSL['version'] = '0.6.5'; --- 27,71 ---- */ // require "/path/to/jpcache.php"; ! if(array_key_exists('JPCACHE_TYPE', $GLOBALS)) { ! $varkey = ''; ! if( (!empty($HTTP_COOKIE_VARS['slashSess'])) || ! (!empty($HTTP_COOKIE_VARS['user_info'])) ) { ! $varkey = md5("POST=" . serialize($HTTP_POST_VARS) . " GET=" . serialize($HTTP_GET_VARS) . " COOKIE=" . serialize($HTTP_COOKIE_VARS)); ! } else { ! ! // $scriptkey = "-uid-nobody"; ! $scriptkey = ""; ! if(!empty($HTTP_COOKIE_VARS['skin'])) { ! $scriptkey .= "-skin-". $HTTP_COOKIE_VARS['skin']; ! } ! } ! $lang_ary = split( "[,;]", $HTTP_ACCEPT_LANGUAGE); ! if(!empty($lang_ary[0])) { ! $scriptkey .= "-lang-". $lang_ary[0]; ! // } else { ! // $scriptkey .= "-lang-blank"; ! } ! if( !empty($HTTP_COOKIE_VARS['TZ'])) { ! $scriptkey .= "-TZ-". $HTTP_COOKIE_VARS['TZ']; ! // } else { ! // $scriptkey .= "-TZ-America-Chicago"; ! } ! foreach( $HTTP_GET_VARS as $key => $value) { ! $scriptkey .= "-". $key ."-". $value; ! } ! if ((empty($HTTP_GET_VARS['section'])) AND ! (empty($HTTP_GET_VARS['section_id']))){ ! $scriptkey .= "-section_id-3"; ! } ! // not too goofy key names ! $scriptkey = preg_replace("'/|:|\\|\*|<|>|\|'","-", $HTTP_SERVER_VARS['PHP_SELF'].$scriptkey); ! if($GLOBALS['JPCACHE_IGNORE_DOMAIN'] == 0) { ! $scriptkey = str_replace(".","-", $HTTP_SERVER_VARS['HTTP_HOST'] .$scriptkey); } + jpcache_start('',$scriptkey, $varkey); } + + $_PSL['version'] = '0.6.5'; *************** *** 108,113 **** $_PSL['DB_Password'] = "foo"; ! ! if(empty($GLOBALS['JPCACHE_VERSION'])) { // jpcachedir -> the full directory path to the jpcache scripts. --- 130,135 ---- $_PSL['DB_Password'] = "foo"; ! // begin built-in jpcache ! if(empty($GLOBALS['JPCACHE_TYPE'])) { // jpcachedir -> the full directory path to the jpcache scripts. *************** *** 122,126 **** /** ! * General configuration options. */ $JPCACHE_TIME = 900; // Default number of seconds to cache a page --- 144,148 ---- /** ! * General jpcache configuration options. */ $JPCACHE_TIME = 900; // Default number of seconds to cache a page *************** *** 157,193 **** // first if this works on your mySQL! ! // Standard functions require $_PSL['jpcachedir']. "/jpcache-main.php"; ! // Type specific implementations require $_PSL['jpcachedir'] ."/type/$JPCACHE_TYPE.php"; ! ! if ( (empty($HTTP_COOKIE_VARS['slashSess'])) AND ! (empty($HTTP_COOKIE_VARS['user_info'])) AND ! (empty($HTTP_COOKIE_VARS['skin'])) ) { ! ! $varkey = "-uid-nobody-lang-". $_PSL['language']."-skin-". $_PSL['defaultskin']; ! if( !empty($HTTP_COOKIE_VARS['TZ'])) { ! $varkey .= "-TZ-". $HTTP_COOKIE_VARS['TZ']; ! } else { ! $varkey .= "-TZ-". $_PSL['timezone']['name']; ! } ! foreach( $HTTP_GET_VARS as $key => $value) { ! $varkey .= "-". $key ."-". $value; ! } ! if ((empty($HTTP_GET_VARS['section'])) AND ! (empty($HTTP_GET_VARS['section_id']))){ ! $varkey .= "-section_id-". $_PSL['home_section_id']; ! } ! $key = str_replace("/","-", $_PSL['phpself'].$varkey); ! if($GLOBALS['JPCACHE_IGNORE_DOMAIN'] == 0) { ! $key = str_replace(".","-", $HTTP_SERVER_VARS['HTTP_HOST'] .$key); } ! jpcache_start('',$key); } ! } - // end of jpcache configuration // 1.11.2) Debug options --- 179,231 ---- // first if this works on your mySQL! ! // Standard jpcache functions require $_PSL['jpcachedir']. "/jpcache-main.php"; ! // Type specific jpcache implementations require $_PSL['jpcachedir'] ."/type/$JPCACHE_TYPE.php"; ! // end of jpcache configuration ! ! // cache invocation ! $varkey = ''; ! if( (!empty($HTTP_COOKIE_VARS['slashSess'])) || ! (!empty($HTTP_COOKIE_VARS['user_info'])) ) { ! $varkey = md5("POST=" . serialize($HTTP_POST_VARS) . " GET=" . serialize($HTTP_GET_VARS) . " COOKIE=" . serialize($HTTP_COOKIE_VARS)); ! } else { ! ! // $scriptkey = "-uid-nobody"; ! if(!empty($HTTP_COOKIE_VARS['skin'])) { ! $scriptkey .= "-skin-". $_PSL['skin']; } ! } ! $lang_ary = split( "[,;]", $HTTP_ACCEPT_LANGUAGE); ! if(!empty($lang_ary[0])) { ! $scriptkey .= "-lang-". $lang_ary[0]; ! // } else { ! // $scriptkey .= "-lang-blank"; } ! if( !empty($HTTP_COOKIE_VARS['TZ'])) { ! $scriptkey .= "-TZ-". $HTTP_COOKIE_VARS['TZ']; ! } else { ! $scriptkey .= "-TZ-". $_PSL['timezone']['name']; ! } ! foreach( $HTTP_GET_VARS as $key => $value) { ! $scriptkey .= "-". $key ."-". $value; ! } ! if ((empty($HTTP_GET_VARS['section'])) AND ! (empty($HTTP_GET_VARS['section_id']))){ ! $scriptkey .= "-section_id-". $_PSL['home_section_id']; ! } ! // not too goofy key names ! $scriptkey = preg_replace("'/|:|\\|\*|<|>|\|'","-", $_PSL['phpself'].$scriptkey); ! if($GLOBALS['JPCACHE_IGNORE_DOMAIN'] == 0) { ! $scriptkey = str_replace(".","-", $HTTP_SERVER_VARS['HTTP_HOST'] .$scriptkey); ! } ! jpcache_start('',$scriptkey, $varkey); ! ! // end of jpcache invocation ! ! } // end of built-in jpcache portion // 1.11.2) Debug options *************** *** 775,794 **** 'auth' => 'slashAuth', 'perm' => 'slashPerm')); - - if (( array_key_exists('slashSess', $HTTP_COOKIE_VARS)) AND - (array_key_exists('JPCACHE_TYPE', $GLOBALS)) ) { - $varkey = "-uid-".$auth->auth['uid']."-lang-". $_PSL['language']."-skin-". $_PSL['skin']; - if( !empty($HTTP_COOKIE_VARS['TZ'])) { - $varkey .= "-TZ-". $HTTP_COOKIE_VARS['TZ']; - } - foreach( $ary as $key => $value) { - $varkey .= "-". $key ."-". $value; - } - $key = str_replace("/","-", $_PSL['phpself'].$varkey); - if($GLOBALS['JPCACHE_IGNORE_DOMAIN'] == 0) { - $key = str_replace(".","-", $HTTP_SERVER_VARS['HTTP_HOST'] .$key); - } - jpcache_start('',$key); - } /* ============= Things to deprecate ============= */ --- 813,816 ---- |
From: Joe S. <joe...@us...> - 2002-12-03 17:47:43
|
Update of /cvsroot/phpslash/phpslash-ft In directory sc8-pr-cvs1:/tmp/cvs-serv29509/phpslash-ft Modified Files: CHANGES Log Message: jpcache tweaking Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.624 retrieving revision 1.625 diff -C2 -d -r1.624 -r1.625 *** CHANGES 26 Nov 2002 16:19:34 -0000 1.624 --- CHANGES 3 Dec 2002 17:47:39 -0000 1.625 *************** *** 13,16 **** --- 13,21 ---- 9 - Removal of something (kill -9 :) + 2002-December-26 12:00PM CST Joe Stewart <joe...@us...> + [E] - config.php3, config-dist.php3 - further tweaking jpcache config. + Known issue: cache use is not compatible with GET fallback or + trans_sid on. + 2002-November-26 10:00AM CST Joe Stewart <joe...@us...> [E] - config.php3 - move database variables up closer to top of config file. |
From: Joe S. <joe...@us...> - 2002-11-26 16:19:40
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory sc8-pr-cvs1:/tmp/cvs-serv29113/phpslash-ft/public_html Modified Files: config.php3 Log Message: move database variables closer to top of config file Index: config.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/config.php3,v retrieving revision 1.165 retrieving revision 1.166 diff -C2 -d -r1.165 -r1.166 *** config.php3 25 Nov 2002 00:34:26 -0000 1.165 --- config.php3 26 Nov 2002 16:19:36 -0000 1.166 *************** *** 102,105 **** --- 102,112 ---- $_PSL['topicimagedir'] = $_PSL['basedir'] . "/images" . "/topics"; + + $_PSL['DB_Host'] = "localhost"; + $_PSL['DB_Database'] = "psl"; + $_PSL['DB_User'] = "psl"; + $_PSL['DB_Password'] = "foo"; + + if(empty($GLOBALS['JPCACHE_VERSION'])) { *************** *** 194,201 **** // 1.11.4) Other Variables... - $_PSL['DB_Host'] = "localhost"; - $_PSL['DB_Database'] = "psl"; - $_PSL['DB_User'] = "psl"; - $_PSL['DB_Password'] = "foo"; $_PSL['module']['Glossary'] = true; --- 201,204 ---- |
From: Joe S. <joe...@us...> - 2002-11-26 16:19:39
|
Update of /cvsroot/phpslash/phpslash-ft In directory sc8-pr-cvs1:/tmp/cvs-serv29113/phpslash-ft Modified Files: CHANGES Log Message: move database variables closer to top of config file Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.623 retrieving revision 1.624 diff -C2 -d -r1.623 -r1.624 *** CHANGES 24 Nov 2002 23:32:17 -0000 1.623 --- CHANGES 26 Nov 2002 16:19:34 -0000 1.624 *************** *** 13,16 **** --- 13,19 ---- 9 - Removal of something (kill -9 :) + 2002-November-26 10:00AM CST Joe Stewart <joe...@us...> + [E] - config.php3 - move database variables up closer to top of config file. + 2002-November-24 5:00PM CST Joe Stewart <joe...@us...> [W] - config.php3, config-dist.php3, admin/config.php3 - moved admin |
From: Joe S. <joe...@us...> - 2002-11-25 00:34:29
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory sc8-pr-cvs1:/tmp/cvs-serv31030/phpslash-ft/public_html Modified Files: config-dist.php3 config.php3 Log Message: jpcache related Index: config-dist.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/config-dist.php3,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** config-dist.php3 24 Nov 2002 23:32:17 -0000 1.16 --- config-dist.php3 25 Nov 2002 00:34:26 -0000 1.17 *************** *** 45,49 **** } } - */ $_PSL = array(); --- 45,48 ---- Index: config.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/config.php3,v retrieving revision 1.164 retrieving revision 1.165 diff -C2 -d -r1.164 -r1.165 *** config.php3 24 Nov 2002 23:32:18 -0000 1.164 --- config.php3 25 Nov 2002 00:34:26 -0000 1.165 *************** *** 45,49 **** } } - */ $_PSL['version'] = '0.6.5'; --- 45,48 ---- |
From: Joe S. <joe...@us...> - 2002-11-24 23:32:21
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/admin In directory sc8-pr-cvs1:/tmp/cvs-serv27949/phpslash-ft/public_html/admin Modified Files: config.php3 Log Message: admin classes only for admin pages Index: config.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/admin/config.php3,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** config.php3 23 Nov 2002 13:22:20 -0000 1.3 --- config.php3 24 Nov 2002 23:32:18 -0000 1.4 *************** *** 1,10 **** <?php ! // don't cache admin pages ! $cachetimeout=-1; ! require("../config.php3"); ! if( $ary['section_id'] == $_PSL['home_section_id']) { ! $ary['section_id'] = ''; } ?> --- 1,70 ---- <?php ! // don't cache admin pages ! $cachetimeout=-1; ! require("../config.php3"); ! ! if( $ary['section_id'] == $_PSL['home_section_id']) { ! $ary['section_id'] = ''; ! } ! foreach($_PSL['module'] as $key => $value) { ! ! switch ($key) { ! ! case 'Author': ! ! break; ! ! case 'Block': ! ! require($_PSL['classdir'] . "/Block_admin.class"); ! break; ! ! case 'Comment': ! ! break; ! ! case 'Glossary': ! ! break; ! ! case 'Group': ! ! break; ! ! case 'MailingList': ! ! break; ! ! ! case 'NavBar': ! ! break; ! ! case 'Poll': ! ! break; ! ! case 'Story': ! ! require($_PSL['classdir'] . "/Story_admin.class"); ! break; ! ! case 'Submission': ! ! break; ! ! case 'TopicBar': ! ! break; ! ! case 'Variable': ! ! break; ! } + + } + ?> |
From: Joe S. <joe...@us...> - 2002-11-24 23:32:21
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory sc8-pr-cvs1:/tmp/cvs-serv27949/phpslash-ft/public_html Modified Files: config-dist.php3 config.php3 Log Message: admin classes only for admin pages Index: config-dist.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/config-dist.php3,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** config-dist.php3 24 Nov 2002 23:21:57 -0000 1.15 --- config-dist.php3 24 Nov 2002 23:32:17 -0000 1.16 *************** *** 487,492 **** require($_PSL['classdir'] . "/Block.class"); require($_PSL['classdir'] . "/Block_i.class"); ! require($_PSL['classdir'] . "/Block_admin.class"); ! require($_PSL['classdir'] . "/Block_render_i.class"); break; --- 487,492 ---- require($_PSL['classdir'] . "/Block.class"); require($_PSL['classdir'] . "/Block_i.class"); ! // require($_PSL['classdir'] . "/Block_admin.class"); ! require($_PSL['classdir'] . "/Block_render_i.class"); break; *************** *** 526,530 **** require($_PSL['classdir'] . "/Story_base.class"); require($_PSL['classdir'] . "/Story.class"); ! require($_PSL['classdir'] . "/Story_admin.class"); break; --- 526,530 ---- require($_PSL['classdir'] . "/Story_base.class"); require($_PSL['classdir'] . "/Story.class"); ! // require($_PSL['classdir'] . "/Story_admin.class"); break; Index: config.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/config.php3,v retrieving revision 1.163 retrieving revision 1.164 diff -C2 -d -r1.163 -r1.164 *** config.php3 24 Nov 2002 23:23:49 -0000 1.163 --- config.php3 24 Nov 2002 23:32:18 -0000 1.164 *************** *** 671,676 **** require($_PSL['classdir'] . "/Block.class"); require($_PSL['classdir'] . "/Block_i.class"); ! require($_PSL['classdir'] . "/Block_admin.class"); ! require($_PSL['classdir'] . "/Block_render_i.class"); break; --- 671,676 ---- require($_PSL['classdir'] . "/Block.class"); require($_PSL['classdir'] . "/Block_i.class"); ! // require($_PSL['classdir'] . "/Block_admin.class"); ! require($_PSL['classdir'] . "/Block_render_i.class"); break; *************** *** 710,714 **** require($_PSL['classdir'] . "/Story_base.class"); require($_PSL['classdir'] . "/Story.class"); ! require($_PSL['classdir'] . "/Story_admin.class"); break; --- 710,714 ---- require($_PSL['classdir'] . "/Story_base.class"); require($_PSL['classdir'] . "/Story.class"); ! // require($_PSL['classdir'] . "/Story_admin.class"); break; |
From: Joe S. <joe...@us...> - 2002-11-24 23:32:20
|
Update of /cvsroot/phpslash/phpslash-ft In directory sc8-pr-cvs1:/tmp/cvs-serv27949/phpslash-ft Modified Files: CHANGES Log Message: admin classes only for admin pages Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.622 retrieving revision 1.623 diff -C2 -d -r1.622 -r1.623 *** CHANGES 24 Nov 2002 23:12:55 -0000 1.622 --- CHANGES 24 Nov 2002 23:32:17 -0000 1.623 *************** *** 14,17 **** --- 14,21 ---- 2002-November-24 5:00PM CST Joe Stewart <joe...@us...> + [W] - config.php3, config-dist.php3, admin/config.php3 - moved admin + class require statements to admin config. + + 2002-November-24 5:00PM CST Joe Stewart <joe...@us...> [E] - config-dist.php3, config.php3 - more jpcache configuration. [B] - Story.class - getNextPrev could get caught in a loop. |
From: Joe S. <joe...@us...> - 2002-11-24 23:23:51
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory sc8-pr-cvs1:/tmp/cvs-serv22824/phpslash-ft/public_html Modified Files: config.php3 Log Message: jpcache related Index: config.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/config.php3,v retrieving revision 1.162 retrieving revision 1.163 diff -C2 -d -r1.162 -r1.163 *** config.php3 24 Nov 2002 23:21:57 -0000 1.162 --- config.php3 24 Nov 2002 23:23:49 -0000 1.163 *************** *** 145,149 **** $JPCACHE_DB_DATABASE = $_PSL['DB_Database']; // Database-name to use $JPCACHE_DB_USERNAME = $_PSL['DB_User']; // Username ! $JPCACHE_DB_PASSWORD = $_PSL['Password']; // Password $JPCACHE_DB_TABLE = "CACHEDATA"; // Table that holds the data $JPCACHE_OPTIMIZE = 0; // If 'OPTIMIZE TABLE' after garbage --- 145,149 ---- $JPCACHE_DB_DATABASE = $_PSL['DB_Database']; // Database-name to use $JPCACHE_DB_USERNAME = $_PSL['DB_User']; // Username ! $JPCACHE_DB_PASSWORD = $_PSL['DB_Password']; // Password $JPCACHE_DB_TABLE = "CACHEDATA"; // Table that holds the data $JPCACHE_OPTIMIZE = 0; // If 'OPTIMIZE TABLE' after garbage |
From: Joe S. <joe...@us...> - 2002-11-24 23:21:59
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory sc8-pr-cvs1:/tmp/cvs-serv21627/phpslash-ft/public_html Modified Files: config-dist.php3 config.php3 Log Message: jpcache related Index: config-dist.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/config-dist.php3,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** config-dist.php3 24 Nov 2002 23:14:02 -0000 1.14 --- config-dist.php3 24 Nov 2002 23:21:57 -0000 1.15 *************** *** 154,158 **** $JPCACHE_DB_DATABASE = $_PSL['DB_Database']; // Database-name to use $JPCACHE_DB_USERNAME = $_PSL['DB_User']; // Username ! $JPCACHE_DB_PASSWORD = ""; // Password $JPCACHE_DB_TABLE = "CACHEDATA"; // Table that holds the data $JPCACHE_OPTIMIZE = 0; // If 'OPTIMIZE TABLE' after garbage --- 154,158 ---- $JPCACHE_DB_DATABASE = $_PSL['DB_Database']; // Database-name to use $JPCACHE_DB_USERNAME = $_PSL['DB_User']; // Username ! $JPCACHE_DB_PASSWORD = $_PSL['DB_Password']; // Password $JPCACHE_DB_TABLE = "CACHEDATA"; // Table that holds the data $JPCACHE_OPTIMIZE = 0; // If 'OPTIMIZE TABLE' after garbage *************** *** 558,562 **** 'perm' => 'slashPerm')); ! if ( !empty($HTTP_COOKIE_VARS)) { $varkey = "-uid-".$auth->auth['uid']."-lang-". $_PSL['language']."-skin-". $_PSL['skin']; if( !empty($HTTP_COOKIE_VARS['TZ'])) { --- 558,563 ---- 'perm' => 'slashPerm')); ! if (( array_key_exists('slashSess', $HTTP_COOKIE_VARS)) AND ! (array_key_exists('JPCACHE_TYPE', $GLOBALS)) ) { $varkey = "-uid-".$auth->auth['uid']."-lang-". $_PSL['language']."-skin-". $_PSL['skin']; if( !empty($HTTP_COOKIE_VARS['TZ'])) { *************** *** 567,570 **** --- 568,574 ---- } $key = str_replace("/","-", $_PSL['phpself'].$varkey); + if($GLOBALS['JPCACHE_IGNORE_DOMAIN'] == 0) { + $key = str_replace(".","-", $HTTP_SERVER_VARS['HTTP_HOST'] .$key); + } jpcache_start('',$key); } Index: config.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/config.php3,v retrieving revision 1.161 retrieving revision 1.162 diff -C2 -d -r1.161 -r1.162 *** config.php3 24 Nov 2002 23:14:02 -0000 1.161 --- config.php3 24 Nov 2002 23:21:57 -0000 1.162 *************** *** 145,149 **** $JPCACHE_DB_DATABASE = $_PSL['DB_Database']; // Database-name to use $JPCACHE_DB_USERNAME = $_PSL['DB_User']; // Username ! $JPCACHE_DB_PASSWORD = ""; // Password $JPCACHE_DB_TABLE = "CACHEDATA"; // Table that holds the data $JPCACHE_OPTIMIZE = 0; // If 'OPTIMIZE TABLE' after garbage --- 145,149 ---- $JPCACHE_DB_DATABASE = $_PSL['DB_Database']; // Database-name to use $JPCACHE_DB_USERNAME = $_PSL['DB_User']; // Username ! $JPCACHE_DB_PASSWORD = $_PSL['Password']; // Password $JPCACHE_DB_TABLE = "CACHEDATA"; // Table that holds the data $JPCACHE_OPTIMIZE = 0; // If 'OPTIMIZE TABLE' after garbage |
From: Joe S. <joe...@us...> - 2002-11-24 23:14:05
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory sc8-pr-cvs1:/tmp/cvs-serv16336/phpslash-ft/public_html Modified Files: config-dist.php3 config.php3 Log Message: jpcache related Index: config-dist.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/config-dist.php3,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** config-dist.php3 24 Nov 2002 23:12:55 -0000 1.13 --- config-dist.php3 24 Nov 2002 23:14:02 -0000 1.14 *************** *** 108,161 **** } ! // jpcachedir -> the full directory path to the jpcache scripts. ! if(empty($_PSL['jpcachedir'])) { ! $_PSL['jpcachedir'] = $_PSL['classdir'] . "/jpcache"; ! } ! // jpcache configuration - // $JPCACHE_TYPE = "file"; - // $JPCACHE_TYPE = "mysql"; - //$JPCACHE_TYPE = "dbm"; - $JPCACHE_TYPE = "phplib"; ! // General jpcache configuration options. ! ! $JPCACHE_TIME = 900; // Default number of seconds to cache a page ! $JPCACHE_DEBUG = 0; // Turn debugging on/off ! $JPCACHE_IGNORE_DOMAIN= 1; // Ignore domain name in request(single site) ! $JPCACHE_ON = 1; // Turn caching on/off ! $JPCACHE_USE_GZIP = 0; // Whether or not to use GZIP ! $JPCACHE_POST = 1; // Should POST's be cached ! $JPCACHE_GC = 1; // Probability % of garbage collection ! $JPCACHE_GZIP_LEVEL = 9; // GZIPcompressionlevel to use (1=low,9=high) ! $JPCACHE_DELAY_START = 1; // Immediate or manual call to jpcache_start() ! $JPCACHE_HASHSCRIPTKEY = 0; // Hash SCRIPT-KEY or not - // File based caching setting. - $JPCACHE_DIR = "/tmp/jpcache"; // Directory where jpcache must store - // generated files. Please use a dedicated - // directory, and make it writable - $JPCACHE_FILEPREFIX = "jpc-";// Prefix used in the filename. This enables - // us to (more accuratly) recognize jpcache- - // files. ! // DB based caching settings. ! $JPCACHE_DB_HOST = $_PSL['DB_Host']; // Database Server ! $JPCACHE_DB_DATABASE = $_PSL['DB_Database']; // Database-name to use ! $JPCACHE_DB_USERNAME = $_PSL['DB_User']; // Username ! $JPCACHE_DB_PASSWORD = $_PSL['DB_Password']; // Password ! $JPCACHE_DB_TABLE = "CACHEDATA"; // Table that holds the data ! $JPCACHE_OPTIMIZE = 0; // If 'OPTIMIZE TABLE' after garbage ! // collection is executed. Please check ! // first if this works on your mySQL! ! // Standard jpcache functions ! require $_PSL['jpcachedir']. "/jpcache-main.php"; ! // Type specific implementations ! require $_PSL['jpcachedir'] ."/type/$JPCACHE_TYPE.php"; // end of jpcache configuration --- 108,194 ---- } ! if(empty($GLOBALS['JPCACHE_VERSION'])) { ! // jpcachedir -> the full directory path to the jpcache scripts. ! if(empty($_PSL['jpcachedir'])) { ! $_PSL['jpcachedir'] = $_PSL['classdir'] . "/jpcache"; ! } ! // $JPCACHE_TYPE = "file"; ! // $JPCACHE_TYPE = "mysql"; ! // $JPCACHE_TYPE = "dbm"; ! $JPCACHE_TYPE = "phplib"; ! /** ! * General configuration options. ! */ ! $JPCACHE_TIME = 900; // Default number of seconds to cache a page ! $JPCACHE_DEBUG = 0; // Turn debugging on/off ! $JPCACHE_IGNORE_DOMAIN= 1; // Ignore domain name in request(single site) ! $JPCACHE_ON = 1; // Turn caching on/off ! $JPCACHE_USE_GZIP = 0; // Whether or not to use GZIP ! $JPCACHE_POST = 1; // Should POST's be cached ! $JPCACHE_GC = 1; // Probability % of garbage collection ! $JPCACHE_GZIP_LEVEL = 9; // GZIPcompressionlevel to use (1=low,9=high) ! $JPCACHE_DELAY_START = 1; // Immediate or manual call to jpcache_start() ! $JPCACHE_HASHSCRIPTKEY = 0; // Hash SCRIPT-KEY or not ! /** ! * File based caching setting. ! */ ! $JPCACHE_DIR = "/tmp/jpcache"; // Directory where jpcache must store ! // generated files. Please use a dedicated ! // directory, and make it writable ! $JPCACHE_FILEPREFIX = "jpc-";// Prefix used in the filename. This enables ! // us to (more accuratly) recognize jpcache- ! // files. ! ! /** ! * DB based caching settings. ! */ ! $JPCACHE_DB_HOST = $_PSL['DB_Host']; // Database Server ! $JPCACHE_DB_DATABASE = $_PSL['DB_Database']; // Database-name to use ! $JPCACHE_DB_USERNAME = $_PSL['DB_User']; // Username ! $JPCACHE_DB_PASSWORD = ""; // Password ! $JPCACHE_DB_TABLE = "CACHEDATA"; // Table that holds the data ! $JPCACHE_OPTIMIZE = 0; // If 'OPTIMIZE TABLE' after garbage ! // collection is executed. Please check ! // first if this works on your mySQL! ! ! // Standard functions ! require $_PSL['jpcachedir']. "/jpcache-main.php"; ! // Type specific implementations ! require $_PSL['jpcachedir'] ."/type/$JPCACHE_TYPE.php"; ! ! ! if ( (empty($HTTP_COOKIE_VARS['slashSess'])) AND ! (empty($HTTP_COOKIE_VARS['user_info'])) AND ! (empty($HTTP_COOKIE_VARS['skin'])) ) { ! ! $varkey = "-uid-nobody-lang-". $_PSL['language']."-skin-". $_PSL['defaultskin']; ! if( !empty($HTTP_COOKIE_VARS['TZ'])) { ! $varkey .= "-TZ-". $HTTP_COOKIE_VARS['TZ']; ! } else { ! $varkey .= "-TZ-". $_PSL['timezone']['name']; ! } ! foreach( $HTTP_GET_VARS as $key => $value) { ! $varkey .= "-". $key ."-". $value; ! } ! if ((empty($HTTP_GET_VARS['section'])) AND ! (empty($HTTP_GET_VARS['section_id']))){ ! $varkey .= "-section_id-". $_PSL['home_section_id']; ! } ! $key = str_replace("/","-", $_PSL['phpself'].$varkey); ! if($GLOBALS['JPCACHE_IGNORE_DOMAIN'] == 0) { ! $key = str_replace(".","-", $HTTP_SERVER_VARS['HTTP_HOST'] .$key); ! } ! jpcache_start('',$key); ! } ! } // end of jpcache configuration *************** *** 192,210 **** } $ary['section_id'] = $section_id; - } - - if ( (empty($HTTP_COOKIE_VARS['slashSess'])) AND - (empty($HTTP_COOKIE_VARS['user_info'])) AND - (empty($HTTP_COOKIE_VARS['skin'])) ) { - - $varkey = "-uid-nobody-lang-". $_PSL['language']."-skin-". $_PSL['defaultskin']; - if( !empty($HTTP_COOKIE_VARS['TZ'])) { - $varkey .= "-TZ-". $HTTP_COOKIE_VARS['TZ']; - } - foreach( $ary as $key => $value) { - $varkey .= "-". $key ."-". $value; - } - $key = str_replace("/","-", $_PSL['phpself'].$varkey); - jpcache_start('',$key); } --- 225,228 ---- Index: config.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/config.php3,v retrieving revision 1.160 retrieving revision 1.161 diff -C2 -d -r1.160 -r1.161 |