phpslash-commit Mailing List for phpSlash (Page 58)
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: Joe S. <joe...@us...> - 2003-03-11 22:09:11
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory sc8-pr-cvs1:/tmp/cvs-serv2877/phpslash-ft/class Modified Files: slashTemplate.class Log Message: slashTemplate.class - removed exception to allow array call to find inherited templates correctly. Index: slashTemplate.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/slashTemplate.class,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** slashTemplate.class 11 Mar 2003 21:59:14 -0000 1.5 --- slashTemplate.class 11 Mar 2003 22:09:03 -0000 1.6 *************** *** 88,92 **** // no parent skin // see if the defaults work ! if(!$this->set_file($varname, $filename, $this->psl['skin.default'], $this->psl['language.default'])) { // template isn't in the defaults either - bail out $this->message = "set_file: set_file: For varname $varname filename $filepath is invalid."; --- 88,92 ---- // no parent skin // see if the defaults work ! if(!$this->set_file($varname, $filename, $this->psl['defaultskin'], $this->psl['language.default'])) { // template isn't in the defaults either - bail out $this->message = "set_file: set_file: For varname $varname filename $filepath is invalid."; |
From: Joe S. <joe...@us...> - 2003-03-11 21:59:18
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory sc8-pr-cvs1:/tmp/cvs-serv31240/phpslash-ft/class Modified Files: slashTemplate.class Log Message: slashTemplate.class - removed exception to allow array call to find inherited templates correctly. Index: slashTemplate.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/slashTemplate.class,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** slashTemplate.class 11 Mar 2003 18:44:46 -0000 1.4 --- slashTemplate.class 11 Mar 2003 21:59:14 -0000 1.5 *************** *** 106,111 **** $status = true; } ! $status = false; ! $this->message = "set_file: set_file: For varname $varname filename $filepath is invalid."; // $this->halt($this->message); } --- 106,111 ---- $status = true; } ! // $status = false; ! // $this->message = "set_file: set_file: For varname $varname filename $filepath is invalid."; // $this->halt($this->message); } |
From: Joe S. <joe...@us...> - 2003-03-11 21:59:17
|
Update of /cvsroot/phpslash/phpslash-ft In directory sc8-pr-cvs1:/tmp/cvs-serv31240/phpslash-ft Modified Files: CHANGES Log Message: slashTemplate.class - removed exception to allow array call to find inherited templates correctly. Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.722 retrieving revision 1.723 diff -C2 -d -r1.722 -r1.723 *** CHANGES 11 Mar 2003 18:39:15 -0000 1.722 --- CHANGES 11 Mar 2003 21:59:11 -0000 1.723 *************** *** 13,16 **** --- 13,20 ---- 9 - Removal of something (kill -9 :) + 2003-March-11 3:30PM CST Joe Stewart <joe...@us...> + [B - slashTemplate.class - removed exception to allow array call to find + inherited templates correctly. + 2003-March-11 12:30PM CST Joe Stewart <joe...@us...> [W] - config-dist.php3, config.php3, functions.inc, Author.class, |
From: Joe S. <joe...@us...> - 2003-03-11 18:44:51
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory sc8-pr-cvs1:/tmp/cvs-serv5089/phpslash-ft/class Modified Files: slashTemplate.class Log Message: recursive set_file Index: slashTemplate.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/slashTemplate.class,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** slashTemplate.class 8 Feb 2003 11:19:33 -0000 1.3 --- slashTemplate.class 11 Mar 2003 18:44:46 -0000 1.4 *************** *** 13,18 **** /** ! * @var psl configuration variables ! */ var $psl; --- 13,18 ---- /** ! * @var psl configuration variables ! */ var $psl; *************** *** 61,84 **** * @param string filename **/ ! function set_file($varname, $filename = "") { if (!is_array($varname)) { ! $filepath = $this->psl['templatedir'] ."/". $filename; ! if(!file_exists($filepath)) { ! if(file_exists($this->psl['templatedir'] ."/skin.ini")) { ! $skin_cfg = parse_ini_file($this->psl['templatedir'] ."/". "skin.ini"); ! $templatedir = substr($this->psl['templatedir'], 0, strrpos($this->psl['templatedir'], "/") ); ! $filepath = $templatedir ."/". $skin_cfg['skin.parent'] ."/". $filename; ! if(!file_exists($filepath)) { ! $this->message = "set_file: set_file: For varname $varname filename $filepath is invalid."; ! // $this->halt($this->message); ! return false; ! } ! } else { $this->message = "set_file: set_file: For varname $varname filename $filepath is invalid."; // $this->halt($this->message); ! return false; } } ! return Template::set_file($varname, $filepath); } else { --- 61,115 ---- * @param string filename **/ ! function set_file($varname, $filename = "", $skin="", $language="") { if (!is_array($varname)) { ! ! // default to the current skin ! if($skin == "") { ! $skin = $this->psl['skin.current']; ! } ! ! // default to the current language ! if($language == "") { ! $language = $this->psl['language.current']; ! } ! ! // assemble the templatedir ! // $templatedir = $this->psl['templatedir.main'] ."/". basename($language) ."/". basename($skin); ! $templatedir = $this->psl['templatedir.main'] ."/". $language ."/". $skin; ! // assemble the filepath ! $filepath = $templatedir ."/". $filename; ! // debug("slashTemplate::set_file::filepath", $filepath); ! ! $status = false; ! ! if( file_exists($filepath)) { ! $status = Template::set_file($varname, $filepath); ! } elseif(!file_exists($templatedir ."/skin.ini")) { ! // no parent skin ! // see if the defaults work ! if(!$this->set_file($varname, $filename, $this->psl['skin.default'], $this->psl['language.default'])) { ! // template isn't in the defaults either - bail out $this->message = "set_file: set_file: For varname $varname filename $filepath is invalid."; // $this->halt($this->message); ! $status = false; ! } ! $status = true; ! } else { ! $skin_cfg = ''; ! $skin_cfg = parse_ini_file($templatedir ."/skin.ini"); ! if(!empty($skin_cfg['skin.parent.language'])) { ! $language = $skin_cfg['skin.parent.language']; ! } ! if($this->set_file($varname, $filename, $skin_cfg['skin.parent'], $language)) { ! $status = true; ! } elseif($this->set_file($varname, $filename, $skin_cfg['skin.parent'], $this->psl['language.default'])) { ! $status = true; } + $status = false; + $this->message = "set_file: set_file: For varname $varname filename $filepath is invalid."; + // $this->halt($this->message); } ! ! // return $status; } else { *************** *** 86,115 **** while(list($v, $f) = each($varname)) { ! ! $filepath = $this->psl['templatedir'] ."/". $f; ! if( file_exists($filepath)) { ! $varname_ary[$v] = $filepath; ! ! } else { ! if(file_exists($this->psl['templatedir'] ."/skin.ini")) { ! $skin_cfg = parse_ini_file($this->psl['templatedir'] ."/". "skin.ini"); ! $templatedir = substr($this->psl['templatedir'], 0, strrpos($this->psl['templatedir'], "/") ); ! $filepath = $templatedir ."/". $skin_cfg['skin.parent'] ."/". $f; ! $varname_ary[$v] = $filepath; ! if(!is_file($filepath)) { ! $this->message = "set_file: set_file: For varname $v filename $filepath is invalid."; ! $this->halt($this->message); ! } ! } else { ! $this->message = "set_file: set_file: For varname $varname filename $filepath is invalid."; ! $this->halt($this->message); ! } ! } } ! return Template::set_file($varname_ary, $filename); } ! // no matches return false. ! return false; } // end of function set_root --- 117,129 ---- while(list($v, $f) = each($varname)) { ! if(!$this->set_file($v, $f)) { ! ! return false; ! } } ! $status = true; } ! return $status; } // end of function set_root *************** *** 118,133 **** // As per template.inc, with added test for windows absolute path function filename($filename) { ! if ($this->debug & 4) { ! echo "<p><b>filename:</b> filename = $filename</p>\n"; ! } ! if (substr($filename, 0, 1) != "/" && substr($filename, 1, 1) != ":") { // Test for Windows absolute path - could use preg_match(/[A-Z]:/i,...) test? ! $filename = $this->root."/".$filename; ! } ! if (!file_exists($filename)) { ! $this->halt("filename: file $filename does not exist."); ! } ! return $filename; ! } } // end of slashTemplate class --- 132,147 ---- // As per template.inc, with added test for windows absolute path function filename($filename) { ! if ($this->debug & 4) { ! echo "<p><b>filename:</b> filename = $filename</p>\n"; ! } ! if (substr($filename, 0, 1) != "/" && substr($filename, 1, 1) != ":") { // Test for Windows absolute path - could use preg_match(/[A-Z]:/i,...) test? ! $filename = $this->root."/".$filename; ! } ! if (!file_exists($filename)) { ! $this->halt("filename: file $filename does not exist."); ! } ! return $filename; ! } } // end of slashTemplate class |
From: Joe S. <joe...@us...> - 2003-03-11 18:39:54
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory sc8-pr-cvs1:/tmp/cvs-serv1883/phpslash-ft/class Modified Files: functions.inc Author.class Block_render_skin.class Log Message: Changed templatedir.default to templatedir.main. Index: functions.inc =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/functions.inc,v retrieving revision 1.137 retrieving revision 1.138 diff -C2 -d -r1.137 -r1.138 *** functions.inc 6 Mar 2003 18:43:00 -0000 1.137 --- functions.inc 11 Mar 2003 18:39:16 -0000 1.138 *************** *** 1170,1174 **** // start with default ! $templatedir = $_PSL['templatedir.default']; if( $new_lang) { // directly set language --- 1170,1174 ---- // start with default ! $templatedir = $_PSL['templatedir.main']; if( $new_lang) { // directly set language *************** *** 1183,1191 **** if( strlen($lang_ary[$i]) > 0) { $base_lang = split( "[_-]", trim($lang_ary[$i])); ! if (@is_dir( $_PSL['templatedir.default'] . "/" . trim($lang_ary[$i]))) { ! $templatedir = $_PSL['templatedir.default'] . "/" . trim($lang_ary[$i]); $done = true; ! } elseif (@is_dir( $_PSL['templatedir.default'] . "/" . $base_lang[0])) { ! $templatedir = $_PSL['templatedir.default'] . "/" . $base_lang[0]; $done = true; } --- 1183,1191 ---- if( strlen($lang_ary[$i]) > 0) { $base_lang = split( "[_-]", trim($lang_ary[$i])); ! if (@is_dir( $_PSL['templatedir.main'] . "/" . trim($lang_ary[$i]))) { ! $templatedir = $_PSL['templatedir.main'] . "/" . trim($lang_ary[$i]); $done = true; ! } elseif (@is_dir( $_PSL['templatedir.main'] . "/" . $base_lang[0])) { ! $templatedir = $_PSL['templatedir.main'] . "/" . $base_lang[0]; $done = true; } *************** *** 1255,1259 **** // remove skin name from templatedir path // $templatedir = substr($templatedir, 0, strrpos($templatedir, "/") ); ! $templatedir = $_PSL['templatedir.default'] ."/". $_PSL['language.current'] ; } --- 1255,1259 ---- // remove skin name from templatedir path // $templatedir = substr($templatedir, 0, strrpos($templatedir, "/") ); ! $templatedir = $_PSL['templatedir.main'] ."/". $_PSL['language.current'] ; } *************** *** 1285,1289 **** // set skin to default skin in default language $new_skin = $_PSL['defaultskin']; ! $templatedir = $_PSL['templatedir.default'] ."/". $_PSL['language.default']; // delete the cookie to reset to default skin if (!empty($HTTP_COOKIE_VARS['skin'])) { --- 1285,1289 ---- // set skin to default skin in default language $new_skin = $_PSL['defaultskin']; ! $templatedir = $_PSL['templatedir.main'] ."/". $_PSL['language.default']; // delete the cookie to reset to default skin if (!empty($HTTP_COOKIE_VARS['skin'])) { *************** *** 1311,1315 **** // set skin to default skin in default language $new_skin = $_PSL['defaultskin']; ! $templatedir = $_PSL['templatedir.default'] ."/". $_PSL['language.default']; // delete the cookie to reset to default skin if (!empty($HTTP_COOKIE_VARS['skin'])) { --- 1311,1315 ---- // set skin to default skin in default language $new_skin = $_PSL['defaultskin']; ! $templatedir = $_PSL['templatedir.main'] ."/". $_PSL['language.default']; // delete the cookie to reset to default skin if (!empty($HTTP_COOKIE_VARS['skin'])) { Index: Author.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Author.class,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** Author.class 7 Mar 2003 14:47:06 -0000 1.43 --- Author.class 11 Mar 2003 18:39:16 -0000 1.44 *************** *** 541,545 **** } ! $templatedir = $this->psl['templatedir.default'] ."/". $this->psl['language.default'] ."/"; --- 541,545 ---- } ! $templatedir = $this->psl['templatedir.main'] ."/". $this->psl['language.default'] ."/"; *************** *** 714,720 **** } ! $templatedir = $this->psl['templatedir.default'] ."/". $currentlang ."/"; if(!@is_dir($templatedir)) { ! $templatedir = $this->psl['templatedir.default'] ."/". $this->psl['language.default'] ."/"; } --- 714,720 ---- } ! $templatedir = $this->psl['templatedir.main'] ."/". $currentlang ."/"; if(!@is_dir($templatedir)) { ! $templatedir = $this->psl['templatedir.main'] ."/". $this->psl['language.default'] ."/"; } Index: Block_render_skin.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Block_render_skin.class,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Block_render_skin.class 6 Mar 2003 17:36:39 -0000 1.12 --- Block_render_skin.class 11 Mar 2003 18:39:16 -0000 1.13 *************** *** 83,87 **** $output = ''; ! $templatedir = $this->psl['templatedir.default'] ."/". $this->psl['lang'] ."/"; $fulldirlist = @dir($templatedir); --- 83,87 ---- $output = ''; ! $templatedir = $this->psl['templatedir.main'] ."/". $this->psl['lang'] ."/"; $fulldirlist = @dir($templatedir); |
From: Joe S. <joe...@us...> - 2003-03-11 18:39:49
|
Update of /cvsroot/phpslash/phpslash-ft In directory sc8-pr-cvs1:/tmp/cvs-serv1883/phpslash-ft Modified Files: CHANGES Log Message: Changed templatedir.default to templatedir.main. Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.721 retrieving revision 1.722 diff -C2 -d -r1.721 -r1.722 *** CHANGES 11 Mar 2003 17:04:45 -0000 1.721 --- CHANGES 11 Mar 2003 18:39:15 -0000 1.722 *************** *** 13,16 **** --- 13,22 ---- 9 - Removal of something (kill -9 :) + 2003-March-11 12:30PM CST Joe Stewart <joe...@us...> + [W] - config-dist.php3, config.php3, functions.inc, Author.class, + Block_render_skin.class - Changed templatedir.default to templatedir.main. + slashTemplate.class - Changed structure of set_file to make recursive + calls to set the correct path to the template file. + 2003-March-11 11:00AM CST Joe Stewart <joe...@us...> [B] - Group.class - commented debugging "echo" - closes bug [ 701658 ] |
From: Joe S. <joe...@us...> - 2003-03-11 18:39:23
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory sc8-pr-cvs1:/tmp/cvs-serv1883/phpslash-ft/public_html Modified Files: config-dist.php3 config.php3 Log Message: Changed templatedir.default to templatedir.main. Index: config-dist.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/config-dist.php3,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** config-dist.php3 6 Mar 2003 17:26:24 -0000 1.40 --- config-dist.php3 11 Mar 2003 18:39:18 -0000 1.41 *************** *** 113,118 **** $_PSL['templatedir'] = $_PSL['basedir'] . '/templates'; } ! // set as default ! $_PSL['templatedir.default'] = $_PSL['templatedir']; // $adminurl -> The base URL for the admin pages --- 113,118 ---- $_PSL['templatedir'] = $_PSL['basedir'] . '/templates'; } ! // set as main template directory ! $_PSL['templatedir.main'] = $_PSL['templatedir']; // $adminurl -> The base URL for the admin pages Index: config.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/config.php3,v retrieving revision 1.185 retrieving revision 1.186 diff -C2 -d -r1.185 -r1.186 *** config.php3 6 Mar 2003 17:26:24 -0000 1.185 --- config.php3 11 Mar 2003 18:39:18 -0000 1.186 *************** *** 97,102 **** // $templatedir -> Path to the templates directory $_PSL['templatedir'] = $_PSL['basedir'] . '/templates'; ! // set as default ! $_PSL['templatedir.default'] = $_PSL['templatedir']; // $classdir -> Path to the class directory --- 97,103 ---- // $templatedir -> Path to the templates directory $_PSL['templatedir'] = $_PSL['basedir'] . '/templates'; ! ! // set as main template directory ! $_PSL['templatedir.main'] = $_PSL['templatedir']; // $classdir -> Path to the class directory *************** *** 117,120 **** --- 118,126 ---- // topicimagedir -> the full directory path to the topic images. $_PSL['topicimagedir'] = $_PSL['basedir'] . "/images" . "/topics"; + + // localedir -> the full directory path to the language files + if(empty($_PSL['localedir'])) { + $_PSL['localedir'] = $_PSL['classdir'] . "/locale"; + } // 1.3) PHPSlash functions library |
From: Joe S. <joe...@us...> - 2003-03-11 17:04:50
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory sc8-pr-cvs1:/tmp/cvs-serv19130/phpslash-ft/class Modified Files: Group.class Log Message: commented debugging 'echo' - closes bug [ 701658 ] Index: Group.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Group.class,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Group.class 22 Jan 2003 18:48:18 -0000 1.6 --- Group.class 11 Mar 2003 17:04:46 -0000 1.7 *************** *** 227,231 **** '$ary[group_id]', '$val')"; ! echo "<H3>LUT_INSERT: $lut_insert</H3>\n"; $this->db->query($lut_insert); } --- 227,231 ---- '$ary[group_id]', '$val')"; ! // echo "<H3>LUT_INSERT: $lut_insert</H3>\n"; $this->db->query($lut_insert); } |
From: Joe S. <joe...@us...> - 2003-03-11 17:04:49
|
Update of /cvsroot/phpslash/phpslash-ft In directory sc8-pr-cvs1:/tmp/cvs-serv19130/phpslash-ft Modified Files: CHANGES Log Message: commented debugging 'echo' - closes bug [ 701658 ] Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.720 retrieving revision 1.721 diff -C2 -d -r1.720 -r1.721 *** CHANGES 7 Mar 2003 20:01:46 -0000 1.720 --- CHANGES 11 Mar 2003 17:04:45 -0000 1.721 *************** *** 13,16 **** --- 13,20 ---- 9 - Removal of something (kill -9 :) + 2003-March-11 11:00AM CST Joe Stewart <joe...@us...> + [B] - Group.class - commented debugging "echo" - closes bug [ 701658 ] + Debug messages in group admin screen. + 2003-March-07 2:00PM CST Joe Stewart <joe...@us...> [B] - slash-all.sql - set answer_id's for the initial poll. |
From: Joe S. <joe...@us...> - 2003-03-07 20:01:53
|
Update of /cvsroot/phpslash/phpslash-ft/tables/0.7 In directory sc8-pr-cvs1:/tmp/cvs-serv20749/phpslash-ft/tables/0.7 Modified Files: slash-all.sql Log Message: set answer_id's for the initial poll Index: slash-all.sql =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/tables/0.7/slash-all.sql,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** slash-all.sql 25 Feb 2003 16:01:37 -0000 1.25 --- slash-all.sql 7 Mar 2003 20:01:49 -0000 1.26 *************** *** 711,717 **** # ! INSERT INTO psl_poll_answer (question_id, answer_id, answer_text, votes) VALUES (18,'3','PHP Sucks.',''); ! INSERT INTO psl_poll_answer (question_id, answer_id, answer_text, votes) VALUES (18,'2','No.',''); ! INSERT INTO psl_poll_answer (question_id, answer_id, answer_text, votes) VALUES (18,'1','Yes.',1); # -------------------------------------------------------- --- 711,717 ---- # ! INSERT INTO psl_poll_answer (question_id, answer_id, answer_text, votes) VALUES (18,'2','PHP Sucks.',''); ! INSERT INTO psl_poll_answer (question_id, answer_id, answer_text, votes) VALUES (18,'1','No.',''); ! INSERT INTO psl_poll_answer (question_id, answer_id, answer_text, votes) VALUES (18,'0','Yes.',1); # -------------------------------------------------------- |
From: Joe S. <joe...@us...> - 2003-03-07 20:01:52
|
Update of /cvsroot/phpslash/phpslash-ft In directory sc8-pr-cvs1:/tmp/cvs-serv20749/phpslash-ft Modified Files: CHANGES Log Message: set answer_id's for the initial poll Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.719 retrieving revision 1.720 diff -C2 -d -r1.719 -r1.720 *** CHANGES 7 Mar 2003 14:47:02 -0000 1.719 --- CHANGES 7 Mar 2003 20:01:46 -0000 1.720 *************** *** 13,16 **** --- 13,19 ---- 9 - Removal of something (kill -9 :) + 2003-March-07 2:00PM CST Joe Stewart <joe...@us...> + [B] - slash-all.sql - set answer_id's for the initial poll. + 2003-March-07 8:30AM CST Joe Stewart <joe...@us...> [B] - slashAuthCR.class, Author.class, login.php3 - correctly set and delete |
From: Joe S. <joe...@us...> - 2003-03-07 14:47:40
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory sc8-pr-cvs1:/tmp/cvs-serv25465/phpslash-ft/public_html Modified Files: login.php3 Log Message: correctly set and delete the 'user_info' cookie Index: login.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/login.php3,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** login.php3 24 Feb 2003 17:03:17 -0000 1.38 --- login.php3 7 Mar 2003 14:47:05 -0000 1.39 *************** *** 23,27 **** $user_info = unserialize(base64_decode($HTTP_COOKIE_VARS['user_info'])); if(!array_key_exists('preferences',$user_info)) { ! setcookie( 'user_info', '', time()-31536000, $_PSL['rooturl'], "", ""); // $sess->delete(); $HTTP_COOKIE_VARS['user_info'] = ''; --- 23,31 ---- $user_info = unserialize(base64_decode($HTTP_COOKIE_VARS['user_info'])); if(!array_key_exists('preferences',$user_info)) { ! // setcookie( 'user_info', '', time()-31536000, $_PSL['rooturl'], "", ""); ! // strip the rooturl down to its path for the cookie path. ! $rooturl_ary = parse_url($_PSL['rooturl']); ! setcookie( 'user_info', '', time()-31536000,$rooturl_ary['path'] , "" , ""); ! // $sess->delete(); $HTTP_COOKIE_VARS['user_info'] = ''; |
From: Joe S. <joe...@us...> - 2003-03-07 14:47:39
|
Update of /cvsroot/phpslash/phpslash-ft In directory sc8-pr-cvs1:/tmp/cvs-serv25465/phpslash-ft Modified Files: CHANGES Log Message: correctly set and delete the 'user_info' cookie Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.718 retrieving revision 1.719 diff -C2 -d -r1.718 -r1.719 *** CHANGES 6 Mar 2003 21:03:36 -0000 1.718 --- CHANGES 7 Mar 2003 14:47:02 -0000 1.719 *************** *** 13,16 **** --- 13,20 ---- 9 - Removal of something (kill -9 :) + 2003-March-07 8:30AM CST Joe Stewart <joe...@us...> + [B] - slashAuthCR.class, Author.class, login.php3 - correctly set and delete + the "user_info" cookie. + 2003-March-06 3:00PM CST Joe Stewart <joe...@us...> [W] - comment.php3, commentAdmin.php3 - expire poll cache for comment updates |
From: Joe S. <joe...@us...> - 2003-03-07 14:47:16
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory sc8-pr-cvs1:/tmp/cvs-serv25465/phpslash-ft/class Modified Files: Author.class slashAuthCR.class Log Message: correctly set and delete the 'user_info' cookie Index: Author.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Author.class,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** Author.class 6 Mar 2003 17:26:25 -0000 1.42 --- Author.class 7 Mar 2003 14:47:06 -0000 1.43 *************** *** 341,350 **** $preferences['skin'] = $ary['skin']; $cookie_ary['preferences'] = $preferences; ! setcookie( 'user_info', base64_encode(serialize($cookie_ary)), time()+31536000,$this->psl['rooturl'] , "" , ""); } elseif(array_key_exists('user_info', $HTTP_COOKIE_VARS)) { $user_info = unserialize(base64_decode($HTTP_COOKIE_VARS['user_info'])); if(array_key_exists('preferences', $user_info)) { ! setcookie( 'user_info', '', time()-31536000, $this->psl['rooturl'], "", ""); $HTTP_COOKIE_VARS['user_info'] = ''; } --- 341,357 ---- $preferences['skin'] = $ary['skin']; $cookie_ary['preferences'] = $preferences; ! // setcookie( 'user_info', base64_encode(serialize($cookie_ary)), time()+31536000,$this->psl['rooturl'] , "" , ""); ! // strip the rooturl down to its path for the cookie path. ! $rooturl_ary = parse_url($this->psl['rooturl']); ! setcookie( 'user_info', base64_encode(serialize($cookie_ary)), time()+31536000,$rooturl_ary['path'] , "" , ""); } elseif(array_key_exists('user_info', $HTTP_COOKIE_VARS)) { $user_info = unserialize(base64_decode($HTTP_COOKIE_VARS['user_info'])); if(array_key_exists('preferences', $user_info)) { ! // setcookie( 'user_info', '', time()-31536000, $this->psl['rooturl'], "", ""); ! // strip the rooturl down to its path for the cookie path. ! $rooturl_ary = parse_url($this->psl['rooturl']); ! setcookie( 'user_info', '', time()-31536000,$rooturl_ary['path'] , "" , ""); ! $HTTP_COOKIE_VARS['user_info'] = ''; } Index: slashAuthCR.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/slashAuthCR.class,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** slashAuthCR.class 5 Mar 2003 21:20:24 -0000 1.43 --- slashAuthCR.class 7 Mar 2003 14:47:08 -0000 1.44 *************** *** 344,348 **** // setcookie( 'user_info', serialize($cookie_ary), time()+31536000, $this->psl['rooturl'], ereg_replace("www.", "", "$SERVER_NAME"), ""); ! setcookie( 'user_info', base64_encode(serialize($cookie_ary)), time()+31536000,$this->psl['rooturl'] , "" , ""); } --- 344,352 ---- // setcookie( 'user_info', serialize($cookie_ary), time()+31536000, $this->psl['rooturl'], ereg_replace("www.", "", "$SERVER_NAME"), ""); ! // setcookie( 'user_info', base64_encode(serialize($cookie_ary)), time()+31536000,$this->psl['rooturl'] , "" , ""); ! // strip the rooturl down to its path for the cookie path. ! $rooturl_ary = parse_url($this->psl['rooturl']); ! setcookie( 'user_info', base64_encode(serialize($cookie_ary)), time()+31536000,$rooturl_ary['path'] , "" , ""); ! } |
From: Joe S. <joe...@us...> - 2003-03-06 21:03:44
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/admin In directory sc8-pr-cvs1:/tmp/cvs-serv3912/phpslash-ft/public_html/admin Modified Files: commentAdmin.php3 Log Message: expire poll pages for comment updates too Index: commentAdmin.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/admin/commentAdmin.php3,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** commentAdmin.php3 22 Jan 2003 18:23:54 -0000 1.17 --- commentAdmin.php3 6 Mar 2003 21:03:40 -0000 1.18 *************** *** 47,50 **** --- 47,52 ---- // expire cache for this story_id jpcache_gc('string', "-story_id-" . $HTTP_GET_VARS['story_id'], "100"); + jpcache_gc('string', "-question_id-" . $HTTP_GET_VARS['story_id'], "100"); + } else { *************** *** 67,70 **** --- 69,75 ---- // expire cache for this story_id jpcache_gc('string', "-story_id-" . $HTTP_POST_VARS['story_id'], "100"); + jpcache_gc('string', "-question_id-" . $HTTP_POST_VARS['story_id'], "100"); + + } else { |
From: Joe S. <joe...@us...> - 2003-03-06 21:03:44
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory sc8-pr-cvs1:/tmp/cvs-serv3912/phpslash-ft/public_html Modified Files: comment.php3 Log Message: expire poll pages for comment updates too Index: comment.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/comment.php3,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** comment.php3 20 Feb 2003 16:38:31 -0000 1.31 --- comment.php3 6 Mar 2003 21:03:40 -0000 1.32 *************** *** 64,67 **** --- 64,68 ---- if(function_exists('jpcache_gc')) { jpcache_gc('string', "-story_id-" . $ary['story_id'], "100"); + jpcache_gc('string', "-question_id-" . $ary['story_id'], "100"); } $content .= getMessage($cmt->getMessage()); |
From: Joe S. <joe...@us...> - 2003-03-06 21:03:44
|
Update of /cvsroot/phpslash/phpslash-ft In directory sc8-pr-cvs1:/tmp/cvs-serv3912/phpslash-ft Modified Files: CHANGES Log Message: expire poll pages for comment updates too Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.717 retrieving revision 1.718 diff -C2 -d -r1.717 -r1.718 *** CHANGES 6 Mar 2003 18:42:57 -0000 1.717 --- CHANGES 6 Mar 2003 21:03:36 -0000 1.718 *************** *** 13,16 **** --- 13,20 ---- 9 - Removal of something (kill -9 :) + 2003-March-06 3:00PM CST Joe Stewart <joe...@us...> + [W] - comment.php3, commentAdmin.php3 - expire poll cache for comment updates + too. + 2003-March-06 12:00PM CST Joe Stewart <joe...@us...> [W] - functions.inc - setSkinTpl - better exception support for setting skins. |
From: Joe S. <joe...@us...> - 2003-03-06 18:43:05
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory sc8-pr-cvs1:/tmp/cvs-serv2363/phpslash-ft/class Modified Files: functions.inc Log Message: setSkinTpl - better exception support for setting skins Index: functions.inc =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/functions.inc,v retrieving revision 1.136 retrieving revision 1.137 diff -C2 -d -r1.136 -r1.137 *** functions.inc 6 Mar 2003 17:34:29 -0000 1.136 --- functions.inc 6 Mar 2003 18:43:00 -0000 1.137 *************** *** 1167,1174 **** global $_PSL; ! global $HTTP_ACCEPT_LANGUAGE; // start with default ! $templatedir = $_PSL['templatedir']; if( $new_lang) { // directly set language --- 1167,1174 ---- global $_PSL; ! // global $HTTP_ACCEPT_LANGUAGE; // start with default ! $templatedir = $_PSL['templatedir.default']; if( $new_lang) { // directly set language *************** *** 1176,1195 **** $templatedir = $templatedir . "/" . basename($new_lang); } ! } elseif( $HTTP_ACCEPT_LANGUAGE) { // else attempt to get from browser ! $lang_ary = explode( ",", $HTTP_ACCEPT_LANGUAGE); $i = 0; $done = false; while( ( $i < count($lang_ary)) AND ( !$done) ) { if( strlen($lang_ary[$i]) > 0) { ! $base_lang = split( "[_-]", trim($lang_ary[$i])); ! if (@is_dir( $_PSL['templatedir'] . "/" . trim($lang_ary[$i]))) { ! $templatedir = $_PSL['templatedir'] . "/" . trim($lang_ary[$i]); ! $done = true; ! } elseif (@is_dir( $_PSL['templatedir'] . "/" . $base_lang[0])) { ! $templatedir = $_PSL['templatedir'] . "/" . $base_lang[0]; ! $done = true; } ! } ! $i++; } --- 1176,1195 ---- $templatedir = $templatedir . "/" . basename($new_lang); } ! } elseif( $_SERVER['HTTP_ACCEPT_LANGUAGE']) { // else attempt to get from browser ! $lang_ary = explode( ",", $_SERVER['HTTP_ACCEPT_LANGUAGE']); $i = 0; $done = false; while( ( $i < count($lang_ary)) AND ( !$done) ) { if( strlen($lang_ary[$i]) > 0) { ! $base_lang = split( "[_-]", trim($lang_ary[$i])); ! if (@is_dir( $_PSL['templatedir.default'] . "/" . trim($lang_ary[$i]))) { ! $templatedir = $_PSL['templatedir.default'] . "/" . trim($lang_ary[$i]); ! $done = true; ! } elseif (@is_dir( $_PSL['templatedir.default'] . "/" . $base_lang[0])) { ! $templatedir = $_PSL['templatedir.default'] . "/" . $base_lang[0]; ! $done = true; } ! } ! $i++; } *************** *** 1249,1257 **** } if($new_skin) { ! if($method == "userpref") { // remove skin name from templatedir path ! $templatedir = substr($templatedir, 0, strrpos($templatedir, "/") ); } --- 1249,1259 ---- } if($new_skin) { ! ! $_PSL['skin.choice'] = $new_skin; if($method == "userpref") { // remove skin name from templatedir path ! // $templatedir = substr($templatedir, 0, strrpos($templatedir, "/") ); ! $templatedir = $_PSL['templatedir.default'] ."/". $_PSL['language.current'] ; } *************** *** 1260,1271 **** if( $method == "cookie") { setcookie("skin","$new_skin",time()+15552000, "/", ereg_replace("www.", "", "$SERVER_NAME")); ! if(strstr($GLOBALS['QUERY_STRING'], "&skin=")) { ! $query_string = substr_replace ($GLOBALS['QUERY_STRING'], '', strpos($GLOBALS['QUERY_STRING'], "&skin=")); ! } elseif(strstr($GLOBALS['QUERY_STRING'], "skin=")) { ! $query_string = substr_replace ($GLOBALS['QUERY_STRING'], '', strpos($GLOBALS['QUERY_STRING'], "skin=")); } else { $query_string = ''; } ! $GLOBALS['QUERY_STRING'] = $query_string; if($query_string != '') { $query_string = "?" . $query_string; --- 1262,1273 ---- if( $method == "cookie") { setcookie("skin","$new_skin",time()+15552000, "/", ereg_replace("www.", "", "$SERVER_NAME")); ! if(strstr($_SERVER['QUERY_STRING'], "&skin=")) { ! $query_string = substr_replace ($_SERVER['QUERY_STRING'], '', strpos($_SERVER['QUERY_STRING'], "&skin=")); ! } elseif(strstr($_SERVER['QUERY_STRING'], "skin=")) { ! $query_string = substr_replace ($_SERVER['QUERY_STRING'], '', strpos($_SERVER['QUERY_STRING'], "skin=")); } else { $query_string = ''; } ! $_SERVER['QUERY_STRING'] = $query_string; if($query_string != '') { $query_string = "?" . $query_string; *************** *** 1279,1283 **** setcookie("skin","", time()+15552000, "/", ereg_replace("www.", "", "$SERVER_NAME")); } ! } } elseif (!empty($HTTP_COOKIE_VARS['skin'])) { --- 1281,1295 ---- setcookie("skin","", time()+15552000, "/", ereg_replace("www.", "", "$SERVER_NAME")); } ! } else { ! // no default skin for this language. ! // set skin to default skin in default language ! $new_skin = $_PSL['defaultskin']; ! $templatedir = $_PSL['templatedir.default'] ."/". $_PSL['language.default']; ! // delete the cookie to reset to default skin ! if (!empty($HTTP_COOKIE_VARS['skin'])) { ! setcookie("skin","", time()+15552000, "/", ereg_replace("www.", "", "$SERVER_NAME")); ! } ! } ! } elseif (!empty($HTTP_COOKIE_VARS['skin'])) { *************** *** 1289,1298 **** $new_skin = $_PSL['defaultskin']; } } else { ! $new_skin = $_PSL['defaultskin']; } ! // keep up with what skin is assigned $_PSL['skin'] = $new_skin; // append skin --- 1301,1324 ---- $new_skin = $_PSL['defaultskin']; } + } elseif (@is_dir($templatedir . "/" . basename($_PSL['defaultskin']))) { + $new_skin = $_PSL['defaultskin']; + // delete the cookie to reset to default skin + if (!empty($HTTP_COOKIE_VARS['skin'])) { + setcookie("skin","", time()+15552000, "/", ereg_replace("www.", "", "$SERVER_NAME")); + } } else { ! // no default skin for this language. ! // set skin to default skin in default language ! $new_skin = $_PSL['defaultskin']; ! $templatedir = $_PSL['templatedir.default'] ."/". $_PSL['language.default']; ! // delete the cookie to reset to default skin ! if (!empty($HTTP_COOKIE_VARS['skin'])) { ! setcookie("skin","", time()+15552000, "/", ereg_replace("www.", "", "$SERVER_NAME")); ! } } ! // keep up with what skin is assigned $_PSL['skin'] = $new_skin; + $_PSL['skin.current'] = $new_skin; // append skin |
From: Joe S. <joe...@us...> - 2003-03-06 18:43:03
|
Update of /cvsroot/phpslash/phpslash-ft In directory sc8-pr-cvs1:/tmp/cvs-serv2363/phpslash-ft Modified Files: CHANGES Log Message: setSkinTpl - better exception support for setting skins Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.716 retrieving revision 1.717 diff -C2 -d -r1.716 -r1.717 *** CHANGES 6 Mar 2003 17:26:21 -0000 1.716 --- CHANGES 6 Mar 2003 18:42:57 -0000 1.717 *************** *** 13,16 **** --- 13,19 ---- 9 - Removal of something (kill -9 :) + 2003-March-06 12:00PM CST Joe Stewart <joe...@us...> + [W] - functions.inc - setSkinTpl - better exception support for setting skins. + 2003-March-06 11:00AM CST Joe Stewart <joe...@us...> [B] - config-dist.php3, config.php3, functions.inc, Author.clas, |
From: Joe S. <joe...@us...> - 2003-03-06 17:36:44
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory sc8-pr-cvs1:/tmp/cvs-serv734/phpslash-ft/class Modified Files: Block_render_skin.class Log Message: tweaks for register_globals off and use new language and skin variables Index: Block_render_skin.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Block_render_skin.class,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Block_render_skin.class 6 Feb 2003 17:17:46 -0000 1.11 --- Block_render_skin.class 6 Mar 2003 17:36:39 -0000 1.12 *************** *** 50,63 **** } - // remove "skin" from templatedir - $templatedir = substr( $this->psl['templatedir'], 0, strrpos($this->psl['templatedir'], "/") ); ! if( !empty($GLOBALS['QUERY_STRING'])) { ! $QUERY_STRING = $GLOBALS['QUERY_STRING']. $this->psl['amp']; ! } else { ! $QUERY_STRING = ''; ! } ! ! $template = pslNew("slashTemplate",$templatedir . "/" . $skin); $template->debug = 0; --- 50,65 ---- } ! if(strstr($_SERVER['QUERY_STRING'], "&skin=")) { ! $query_string = substr_replace ($_SERVER['QUERY_STRING'], $this->psl['amp'], strpos($_SERVER['QUERY_STRING'], "&skin=")); ! } elseif(strstr($_SERVER['QUERY_STRING'], "skin=")) { ! $query_string = substr_replace ($_SERVER['QUERY_STRING'], '', strpos($_SERVER['QUERY_STRING'], "skin=")); ! } elseif ( !empty($_SERVER['QUERY_STRING'])){ ! $query_string = $_SERVER['QUERY_STRING']. $this->psl['amp']; ! } else { ! $query_string = ''; ! } ! ! $template = pslNew("slashTemplate"); $template->debug = 0; *************** *** 71,75 **** $template->set_block ("template", "each_skin", "skin_block"); $template->set_var (array ( ! 'QUERYSTRING' => $QUERY_STRING, 'SKIN' => "", 'ROOTDIR' => $this->psl['rooturl'], --- 73,77 ---- $template->set_block ("template", "each_skin", "skin_block"); $template->set_var (array ( ! 'QUERYSTRING' => $query_string, 'SKIN' => "", 'ROOTDIR' => $this->psl['rooturl'], *************** *** 77,97 **** 'PHP_SELF' => $this->psl['phpself'] )); ! ! $fulldirlist = dir($templatedir . "/"); ! while( $eachfile = $fulldirlist->read()) { ! if( (@is_dir($templatedir . "/" . $eachfile)) AND ! ( $eachfile != ".") AND ! ( $eachfile != "..") AND ! ( $eachfile != "CVS") ) { ! $template->set_var(array( ! 'SKIN' => $eachfile ! )); ! $template->parse("skin_block","each_skin",true); ! } } - - $output = $template->parse('OUT',"template"); unset($db); return $output; --- 79,103 ---- 'PHP_SELF' => $this->psl['phpself'] )); ! ! // initialize return value. ! $output = ''; ! ! $templatedir = $this->psl['templatedir.default'] ."/". $this->psl['lang'] ."/"; ! ! $fulldirlist = @dir($templatedir); ! if(is_object($fulldirlist)){ ! while( $eachfile = $fulldirlist->read()) { ! if( (@is_dir($templatedir . $eachfile)) AND ! ( $eachfile != ".") AND ! ( $eachfile != "..") AND ! ( $eachfile != "CVS") ) { ! $template->set_var('SKIN', $eachfile); ! $template->parse("skin_block","each_skin",true); ! } ! } ! $output = $template->parse('OUT',"template"); } unset($db); return $output; |
From: Joe S. <joe...@us...> - 2003-03-06 17:34:34
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory sc8-pr-cvs1:/tmp/cvs-serv32064/phpslash-ft/class Modified Files: functions.inc Log Message: tweaks for register_globals off and use new language and skin variables Index: functions.inc =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/functions.inc,v retrieving revision 1.135 retrieving revision 1.136 diff -C2 -d -r1.135 -r1.136 *** functions.inc 4 Mar 2003 21:54:30 -0000 1.135 --- functions.inc 6 Mar 2003 17:34:29 -0000 1.136 *************** *** 1018,1022 **** } } ! debug('localinfo',$localinfo); if(!empty($localinfo[$locale][$category][$keyword])) { $ans = $localinfo[$locale][$category][$keyword]; --- 1018,1022 ---- } } ! // debug('localinfo',$localinfo); if(!empty($localinfo[$locale][$category][$keyword])) { $ans = $localinfo[$locale][$category][$keyword]; *************** *** 1100,1104 **** global $_PSL; ! global $HTTP_ACCEPT_LANGUAGE; // start with default --- 1100,1104 ---- global $_PSL; ! // global $HTTP_ACCEPT_LANGUAGE; // start with default *************** *** 1116,1121 **** $_PSL['lang'] = basename($new_lang); } ! } elseif( $HTTP_ACCEPT_LANGUAGE) { // else try to get from browser ! $lang_ary = split( "[,;]", $HTTP_ACCEPT_LANGUAGE); $i = 0; $done = false; --- 1116,1121 ---- $_PSL['lang'] = basename($new_lang); } ! } elseif( $_SERVER['HTTP_ACCEPT_LANGUAGE']) { // else try to get from browser ! $lang_ary = split( "[,;]", $_SERVER['HTTP_ACCEPT_LANGUAGE']); $i = 0; $done = false; *************** *** 1137,1141 **** } ! return $lang; } --- 1137,1146 ---- } ! ! // set current language variable. ! // TODO - identify use of _PSL['lang'] and move to _PSL['language.current'] ! // jvs 03/06/2003 ! $_PSL['language.current'] = $_PSL['lang']; ! return $lang; } |
From: Joe S. <joe...@us...> - 2003-03-06 17:26:58
|
Update of /cvsroot/phpslash/phpslash-ft In directory sc8-pr-cvs1:/tmp/cvs-serv28330/phpslash-ft Modified Files: CHANGES Log Message: tweaks for register_globals off and use new language and skin variables Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.715 retrieving revision 1.716 diff -C2 -d -r1.715 -r1.716 *** CHANGES 5 Mar 2003 21:20:19 -0000 1.715 --- CHANGES 6 Mar 2003 17:26:21 -0000 1.716 *************** *** 13,16 **** --- 13,21 ---- 9 - Removal of something (kill -9 :) + 2003-March-06 11:00AM CST Joe Stewart <joe...@us...> + [B] - config-dist.php3, config.php3, functions.inc, Author.clas, + Block_render_skin.class - tweaks for register_globals off and + use new language and skin variables. + 2003-March-05 3:30PM CST Joe Stewart <joe...@us...> [B] - slashAuthCR.class - correctly use the "magic" word in the config file |
From: Joe S. <joe...@us...> - 2003-03-06 17:26:30
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory sc8-pr-cvs1:/tmp/cvs-serv28330/phpslash-ft/class Modified Files: Author.class Log Message: tweaks for register_globals off and use new language and skin variables Index: Author.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Author.class,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** Author.class 25 Feb 2003 15:04:13 -0000 1.41 --- Author.class 6 Mar 2003 17:26:25 -0000 1.42 *************** *** 534,546 **** } ! // remove "skin" from templatedir ! $templatedir = substr( $this->psl['templatedir'], 0, strrpos($this->psl['templatedir'], "/") ); $this->author_templ->set_block ("newauthor", "each_skin", "skins"); ! $fulldirlist = dir($templatedir . "/"); while( $eachfile = $fulldirlist->read()) { $this->author_templ->set_var('SKIN_SELECTED', ''); ! if( (@is_dir($templatedir . "/" . $eachfile)) AND ( $eachfile != ".") AND ( $eachfile != "..") AND --- 534,546 ---- } ! $templatedir = $this->psl['templatedir.default'] ."/". $this->psl['language.default'] ."/"; ! $this->author_templ->set_block ("newauthor", "each_skin", "skins"); ! $fulldirlist = dir($templatedir); while( $eachfile = $fulldirlist->read()) { $this->author_templ->set_var('SKIN_SELECTED', ''); ! if( (@is_dir($templatedir . $eachfile)) AND ( $eachfile != ".") AND ( $eachfile != "..") AND *************** *** 707,719 **** } ! // remove "skin" from templatedir ! $templatedir = substr( $this->psl['templatedir'], 0, strrpos($this->psl['templatedir'], "/") ); $this->author_templ->set_block ("template", "each_skin", "skins"); ! $fulldirlist = dir($templatedir . "/"); while( $eachfile = $fulldirlist->read()) { $this->author_templ->set_var('SKIN_SELECTED', ''); ! if( (@is_dir($templatedir . "/" . $eachfile)) AND ( $eachfile != ".") AND ( $eachfile != "..") AND --- 707,721 ---- } ! $templatedir = $this->psl['templatedir.default'] ."/". $currentlang ."/"; ! if(!@is_dir($templatedir)) { ! $templatedir = $this->psl['templatedir.default'] ."/". $this->psl['language.default'] ."/"; ! } $this->author_templ->set_block ("template", "each_skin", "skins"); ! $fulldirlist = @dir($templatedir); while( $eachfile = $fulldirlist->read()) { $this->author_templ->set_var('SKIN_SELECTED', ''); ! if( (@is_dir($templatedir . $eachfile)) AND ( $eachfile != ".") AND ( $eachfile != "..") AND |
From: Joe S. <joe...@us...> - 2003-03-06 17:26:28
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory sc8-pr-cvs1:/tmp/cvs-serv28330/phpslash-ft/public_html Modified Files: config-dist.php3 config.php3 Log Message: tweaks for register_globals off and use new language and skin variables Index: config-dist.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/config-dist.php3,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** config-dist.php3 28 Feb 2003 15:39:23 -0000 1.39 --- config-dist.php3 6 Mar 2003 17:26:24 -0000 1.40 *************** *** 42,46 **** } } ! $lang_ary = split( "[,;]", $HTTP_ACCEPT_LANGUAGE); if(!empty($lang_ary[0])) { $scriptkey .= "-lang-". $lang_ary[0]; --- 42,46 ---- } } ! $lang_ary = split( "[,;]", $_SERVER['HTTP_ACCEPT_LANGUAGE']); if(!empty($lang_ary[0])) { $scriptkey .= "-lang-". $lang_ary[0]; *************** *** 113,116 **** --- 113,118 ---- $_PSL['templatedir'] = $_PSL['basedir'] . '/templates'; } + // set as default + $_PSL['templatedir.default'] = $_PSL['templatedir']; // $adminurl -> The base URL for the admin pages *************** *** 147,160 **** // should be prepended to all phpSlash pages // comment to enable setting lang in url ! $lang = false; ! $_PSL['languagefile'] = $_PSL['localedir'] . "/" . $_PSL['language'] . ".php3"; // comment to disable auto lang detection ! $_PSL['languagefile'] = setLang($lang); // comment to disable auto tpl lang detection ! $_PSL['templatedir'] = setLangTpl($lang); // comment out this block to disable setting theme in url --- 149,169 ---- // should be prepended to all phpSlash pages + // set config language as default + $_PSL['language.default'] = $_PSL['language']; + + if(!empty($HTTP_GET_VARS['lang'])) { + $_PSL['language.choice'] = $HTTP_GET_VARS['lang']; + } + // comment to enable setting lang in url ! $_PSL['language.choice'] = false; ! $_PSL['languagefile'] = $_PSL['localedir'] . "/" . basename($_PSL['language']) .".php3"; // comment to disable auto lang detection ! $_PSL['languagefile'] = setLang($_PSL['language.choice']); // comment to disable auto tpl lang detection ! $_PSL['templatedir'] = setLangTpl($_PSL['language.choice']); // comment out this block to disable setting theme in url *************** *** 322,326 **** } } ! $lang_ary = split( "[,;]", $HTTP_ACCEPT_LANGUAGE); if(!empty($lang_ary[0])) { $scriptkey .= "-lang-". $lang_ary[0]; --- 331,335 ---- } } ! $lang_ary = split( "[,;]", $_SERVER['HTTP_ACCEPT_LANGUAGE']); if(!empty($lang_ary[0])) { $scriptkey .= "-lang-". $lang_ary[0]; Index: config.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/config.php3,v retrieving revision 1.184 retrieving revision 1.185 diff -C2 -d -r1.184 -r1.185 *** config.php3 28 Feb 2003 15:39:24 -0000 1.184 --- config.php3 6 Mar 2003 17:26:24 -0000 1.185 *************** *** 34,38 **** } } ! $lang_ary = split( "[,;]", $HTTP_ACCEPT_LANGUAGE); if(!empty($lang_ary[0])) { $scriptkey .= "-lang-". $lang_ary[0]; --- 34,38 ---- } } ! $lang_ary = split( "[,;]", $_SERVER['HTTP_ACCEPT_LANGUAGE']); if(!empty($lang_ary[0])) { $scriptkey .= "-lang-". $lang_ary[0]; *************** *** 97,100 **** --- 97,102 ---- // $templatedir -> Path to the templates directory $_PSL['templatedir'] = $_PSL['basedir'] . '/templates'; + // set as default + $_PSL['templatedir.default'] = $_PSL['templatedir']; // $classdir -> Path to the class directory *************** *** 294,298 **** } } ! $lang_ary = split( "[,;]", $HTTP_ACCEPT_LANGUAGE); if(!empty($lang_ary[0])) { $scriptkey .= "-lang-". $lang_ary[0]; --- 296,300 ---- } } ! $lang_ary = split( "[,;]", $_SERVER['HTTP_ACCEPT_LANGUAGE']); if(!empty($lang_ary[0])) { $scriptkey .= "-lang-". $lang_ary[0]; *************** *** 332,348 **** * Language **/ ! // comment to enable setting lang in url ! $lang = false; ! $_PSL['localedir'] = $_PSL['classdir'] . "/locale"; // directory holding language files ! $_PSL['language'] = "en"; // default language ( ISO format) ! $_PSL['languagefile'] = $_PSL['localedir'] . "/" . $_PSL['language'] . ".php3"; // comment to disable auto lang detection ! $_PSL['languagefile'] = setLang($lang); // comment to disable auto tpl lang detection ! $_PSL['templatedir'] = setLangTpl($lang); --- 334,354 ---- * Language **/ ! // set config language as default ! $_PSL['language.default'] = $_PSL['language']; ! if(!empty($HTTP_GET_VARS['lang'])) { ! $_PSL['language.choice'] = $HTTP_GET_VARS['lang']; ! } ! // comment to enable setting lang in url ! $_PSL['language.choice'] = false; ! ! $_PSL['languagefile'] = $_PSL['localedir'] . "/" . basename($_PSL['language']) .".php3"; // comment to disable auto lang detection ! $_PSL['languagefile'] = setLang($_PSL['language.choice']); // comment to disable auto tpl lang detection ! $_PSL['templatedir'] = setLangTpl($_PSL['language.choice']); |
From: Joe S. <joe...@us...> - 2003-03-05 21:20:29
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory sc8-pr-cvs1:/tmp/cvs-serv25313/phpslash-ft/class Modified Files: slashAuthCR.class Log Message: slashAuth magic and remember me fix Index: slashAuthCR.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/slashAuthCR.class,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** slashAuthCR.class 21 Feb 2003 22:22:00 -0000 1.42 --- slashAuthCR.class 5 Mar 2003 21:20:24 -0000 1.43 *************** *** 25,39 **** ! function slashAuth() { ! ! global $_PSL; ! ! if(!empty($_PSL['magic'])) { ! $this->magic = $_PSL['magic']; ! } ! // $this->loadClasses("database_class"); ! } ! ! /** * customizes class names and loads the class definitions * --- 25,29 ---- ! /** * customizes class names and loads the class definitions * *************** *** 54,57 **** --- 44,51 ---- $this->psl = &$_PSL; + + if(!empty($_PSL['magic'])) { + $this->magic = $_PSL['magic']; + } $this->loadClasses("database_class"); *************** *** 181,185 **** $this->auth["uname"] = $this->db->Record["author_name"]; $this->auth["dname"] = $this->db->Record["author_realname"]; ! $md5_pw = $this->db->Record['password']; // this is the raw MD5ed user/pass combo $expected_response = md5("$md5_pw:$cookie_challenge"); --- 175,181 ---- $this->auth["uname"] = $this->db->Record["author_name"]; $this->auth["dname"] = $this->db->Record["author_realname"]; ! ! $temparray=unserialize($this->db->Record['author_options']); ! $md5_pw = $this->db->Record['password']; // this is the raw MD5ed user/pass combo $expected_response = md5("$md5_pw:$cookie_challenge"); *************** *** 190,193 **** --- 186,209 ---- $uid = $this->db->Record["author_id"]; $this->auth["perm"] = $this->get_userperms($uid); + + // use preferences + if(!empty($temparray['preferences'])){ + $this->auth['preferences'] = $temparray['preferences']; + + // use language preference + if(isset($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'])) { + if ((isset($this->auth['preferences']['skin'])) && + ($this->psl['defaultskin'] != $this->auth['preferences']['skin'])){ + $this->psl['templatedir'] = setSkinTpl($this->auth['preferences']['skin'],"userpref"); + } + + } + // expire cache for this session |