phpslash-commit Mailing List for phpSlash (Page 35)
Brought to you by:
joestewart,
nhruby
You can subscribe to this list here.
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: Peter C. <kr...@us...> - 2004-07-02 15:55:21
|
Update of /cvsroot/phpslash/phpslash-dev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1670 Modified Files: CHANGES Log Message: Fixes to Group files + functions::setSkinTpl server-name handling (really, this time) Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/CHANGES,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** CHANGES 2 Jul 2004 15:20:12 -0000 1.74 --- CHANGES 2 Jul 2004 15:55:11 -0000 1.75 *************** *** 13,16 **** --- 13,25 ---- 9 - Removal of something (kill -9 :) + 2004-July 2 Peter Cruickshank <kr...@us...> + [WBT]Clean up of Group.class group/admin.php templates/en/permissionList.tpl and groupList.tpl + - notice squashing + - some logic simplification, move to foreach, use of getError() etc + - added Group and Permission description to template + + 2004-July 2 Peter Cruickshank <kr...@us...> + [B] functions.inc - Move setSkinTpl to use $_SERVER[SERVER_NAME] + 2004-June 22 Peter Cruickshank <kr...@us...> [W] - NavBar.class, block/admin.php, search/index.php |
From: Peter C. <kr...@us...> - 2004-07-02 15:20:20
|
Update of /cvsroot/phpslash/phpslash-dev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24571 Modified Files: CHANGES Log Message: Fixes to Group files + functions::setSkinTpl server-name handling Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/CHANGES,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -d -r1.73 -r1.74 *** CHANGES 22 Jun 2004 20:58:24 -0000 1.73 --- CHANGES 2 Jul 2004 15:20:12 -0000 1.74 *************** *** 14,17 **** --- 14,22 ---- 2004-June 22 Peter Cruickshank <kr...@us...> + [W] - NavBar.class, block/admin.php, search/index.php + Block_render_query.class, Block_render_section.class, Block_render_skin.class + Notice squashing, updates to comments and minor tidy-ups + + 2004-June 22 Peter Cruickshank <kr...@us...> [E] - slashAuth now uses index1col.tpl to structure the login form - making layout more compatible with the other pages. Would be nice to move to using the |
From: Peter C. <kr...@us...> - 2004-07-02 15:18:49
|
Update of /cvsroot/phpslash/phpslash-dev/include/templates/en/basic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24168 Modified Files: groupList.tpl permissionList.tpl Log Message: Clean up of code - notice squashing - some logic simplification, move to foreach, use of getError() etc - added Group and Permission description to template Index: groupList.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/templates/en/basic/groupList.tpl,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** groupList.tpl 12 Mar 2003 16:12:52 -0000 1.1.1.1 --- groupList.tpl 2 Jul 2004 15:18:41 -0000 1.2 *************** *** 5,8 **** --- 5,9 ---- <TD><b>ID</b></TD> <TD><b>Name</b></TD> + <TD><b>Desciption</b></TD> <TD><b>Actions</b></TD> </TR> *************** *** 10,15 **** <TR> <TD>{GROUP_ID}</TD> - <TD>{GROUP_NAME}</TD> <TD>{ADMIN}</TD> </TR> --- 11,16 ---- <TR> <TD>{GROUP_ID}</TD> <TD>{GROUP_NAME}</TD> + <TD>{GROUP_DESCRIPTION}</TD> <TD>{ADMIN}</TD> </TR> Index: permissionList.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/templates/en/basic/permissionList.tpl,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** permissionList.tpl 12 Mar 2003 16:12:52 -0000 1.1.1.1 --- permissionList.tpl 2 Jul 2004 15:18:41 -0000 1.2 *************** *** 5,8 **** --- 5,9 ---- <TD><b>ID</b></TD> <TD><b>Name</b></TD> + <TD><b>Description</b></TD> <TD><b>Actions</b></TD> </TR> *************** *** 10,15 **** <TR> <TD>{PERMISSION_ID}</TD> - <TD>{PERMISSION_NAME}</TD> <TD>{ADMIN}</TD> </TR> --- 11,16 ---- <TR> <TD>{PERMISSION_ID}</TD> <TD>{PERMISSION_NAME}</TD> + <TD>{PERMISSION_DESCRIPTION}</TD> <TD>{ADMIN}</TD> </TR> |
From: Peter C. <kr...@us...> - 2004-07-02 15:17:25
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/group In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23832 Modified Files: Group.class admin.php Log Message: Clean up of code - notice squashing - some logic simplification, move to foreach, use of getError() etc - added Group and Permission description to template Index: Group.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/group/Group.class,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Group.class 12 Mar 2003 16:12:56 -0000 1.1.1.1 --- Group.class 2 Jul 2004 15:17:16 -0000 1.2 *************** *** 112,131 **** function saveGroup($ary) { ! debug("Group.class::saveGroup::ary", $ary); ! debug("Group.class::saveGroup::ary['group_id_ary']", $ary['group_id_ary']); ! /* We don't test for group_id because no group_id means, that this is a new group. */ ! if ($ary[group_name] == "") { ! $this->message = "There is no group_name in Group.class::saveGroup"; ! return false; } ! if ($ary[description] == "") { ! $this->message = "There is no description in Group.class::saveGroup"; return false; } ! $section_id_ary = $ary['section_id_ary']; ! $perm_id_ary = $ary['perm_id_ary']; ! $group_id_ary = $ary['group_id_ary']; $ary = clean($ary); --- 112,137 ---- function saveGroup($ary) { ! debug("Group.class::saveGroup::ary", @$ary); ! debug("Group.class::saveGroup::ary['group_id_ary']", @$ary['group_id_ary']); ! /* We don't test for group_id because no group_id means, that this is a new group. */ ! ! $isOk = true; ! if ($ary['group_name'] == "") { ! $this->message .= getError('There is no group_name in Group.class::saveGroup'); ! $isOk = false; } ! if ($ary['description'] == "") { ! $this->message .= getError('There is no description in Group.class::saveGroup'); ! $isOk = false; ! } ! ! if (!$isOk) { return false; } ! $section_id_ary = @$ary['section_id_ary']; ! $perm_id_ary = @$ary['perm_id_ary']; ! $group_id_ary = @$ary['group_id_ary']; $ary = clean($ary); *************** *** 143,157 **** $this->db->query($section_del); ! $permission_del = "DELETE FROM psl_group_permission_lut WHERE group_id='$ary[group_id]'"; // echo "<H3>PERMISSION_DEL: $permission_del</H3>\n"; ! $this->db->query($permission_del); ! ! $childgroup_del = "DELETE FROM psl_group_group_lut WHERE group_id='$ary[group_id]'"; // echo "<H3>CHILDGROUP_DEL: $childgroup_del</H3>\n"; ! $this->db->query($childgroup_del); $q = "UPDATE psl_group --- 149,163 ---- $this->db->query($section_del); ! $permission_del = "DELETE FROM psl_group_permission_lut WHERE group_id='$ary[group_id]'"; // echo "<H3>PERMISSION_DEL: $permission_del</H3>\n"; ! $this->db->query($permission_del); ! ! $childgroup_del = "DELETE FROM psl_group_group_lut WHERE group_id='$ary[group_id]'"; // echo "<H3>CHILDGROUP_DEL: $childgroup_del</H3>\n"; ! $this->db->query($childgroup_del); $q = "UPDATE psl_group *************** *** 159,166 **** group_description = '$ary[description]' WHERE group_id = '$ary[group_id]'"; ! $this->message = "Group information updated"; } else { ! $ary[group_id] = generateID("psl_group_seq"); $q = "INSERT INTO psl_group --- 165,172 ---- group_description = '$ary[description]' WHERE group_id = '$ary[group_id]'"; ! $this->message .= getMessage('Group information updated'); } else { ! $ary[group_id] = generateID('psl_group_seq'); $q = "INSERT INTO psl_group *************** *** 171,177 **** '$ary[group_name]', '$ary[description]')"; ! $this->message = "Group information saved"; } ! // $section_id_ary = $ary['section_id_ary']; if(is_array($section_id_ary) ) { --- 177,183 ---- '$ary[group_name]', '$ary[description]')"; ! $this->message .= getMessage('Group information saved'); } ! // $section_id_ary = $ary['section_id_ary']; if(is_array($section_id_ary) ) { *************** *** 189,195 **** } } else { ! $this->message = "No section chosen."; ! $status = false; ! return $status; } --- 195,201 ---- } } else { ! $this->message .= getError("No section chosen."); ! $status = false; ! return $status; } *************** *** 216,220 **** // return $status; } ! if(is_array($group_id_ary) ) { while ( list( $key, $val ) = each( $group_id_ary ) ) { --- 222,226 ---- // return $status; } ! if(is_array($group_id_ary) ) { while ( list( $key, $val ) = each( $group_id_ary ) ) { *************** *** 227,231 **** '$ary[group_id]', '$val')"; ! echo "<H3>LUT_INSERT: $lut_insert</H3>\n"; $this->db->query($lut_insert); } --- 233,237 ---- '$ary[group_id]', '$val')"; ! #echo "<H3>LUT_INSERT: $lut_insert</H3>\n"; $this->db->query($lut_insert); } *************** *** 236,240 **** } ! $status = true; return $status; } --- 242,246 ---- } ! $status = true; return $status; } *************** *** 244,252 **** * deleteGroup - deletes the group info from the db * ! * Given the group_id, it deletes that from the group table. The ! * psl_group_lut and psl_group_submission_lut table must be cleaned ! * first by updating all the stories to point to different groups. It ! * will also check and make sure there are NO stories/submissions ! * associated with this group before deleting it. Returns true if * group is deleted, false if not. * --- 250,258 ---- * deleteGroup - deletes the group info from the db * ! * Given the group_id, it deletes that from the group table. The ! * psl_group_lut and psl_group_submission_lut table must be cleaned ! * first by updating all the stories to point to different groups. It ! * will also check and make sure there are NO stories/submissions ! * associated with this group before deleting it. Returns true if * group is deleted, false if not. * *************** *** 276,280 **** $name = $this->db->Record["author_name"]; $author_id = $this->db->Record["author_id"]; ! $this->message = pslgetText("Sorry, this group is assigned to author ").$name."(".$author_id.")"; } --- 282,286 ---- $name = $this->db->Record["author_name"]; $author_id = $this->db->Record["author_id"]; ! $this->message .= pslgetText("Sorry, this group is assigned to author ").$name."(".$author_id.")"; } *************** *** 292,301 **** $group_id = $this->db->Record["group_id"]; $group_name = $this->db->Record["group_name"]; ! $this->message = pslgetText("Sorry, this group is assigned to group ").$group_name."(".$group_id.")"; } if (!$go_ahead) { ! $this->message .= " Group not deleted"; return false; } else { --- 298,307 ---- $group_id = $this->db->Record["group_id"]; $group_name = $this->db->Record["group_name"]; ! $this->message .= pslgetText("Sorry, this group is assigned to group ").$group_name."(".$group_id.")"; } if (!$go_ahead) { ! $this->message .= getMessage(" Group not deleted"); return false; } else { *************** *** 304,308 **** WHERE group_id = '$group_id'"; $this->db->query($q); ! $this->message = "Group deleted"; return true; } --- 310,314 ---- WHERE group_id = '$group_id'"; $this->db->query($q); ! $this->message .= getMessage("Group deleted"); return true; } *************** *** 452,455 **** --- 458,462 ---- $i = 0; + $group_section_ary = array(); while ($this->db->next_record()) { $group_section_ary[$i] = $this->db->Record['section_id']; *************** *** 461,467 **** $q = "SELECT childgroup_id ! FROM psl_group_group_lut ! WHERE group_id = '$ary[group_id]' "; ! // debug("q", $q); $this->db->query($q); $i = 0; --- 468,474 ---- $q = "SELECT childgroup_id ! FROM psl_group_group_lut ! WHERE group_id = '$ary[group_id]' "; ! // debug("q", $q); $this->db->query($q); $i = 0; *************** *** 471,490 **** $i++; } ! ! ! // Get the permission_id's for this group into an array ! ! $q = "SELECT permission_id ! FROM psl_group_permission_lut ! WHERE group_id = '$ary[group_id]' "; ! // debug("q", $q); $this->db->query($q); $i = 0; while ($this->db->next_record()) { $group_permission_ary[$i] = $this->db->Record['permission_id']; $i++; } ! $this->group_templ->set_var(array( 'SECTION_ID' => 0, --- 478,498 ---- $i++; } ! ! ! // Get the permission_id's for this group into an array ! ! $q = "SELECT permission_id ! FROM psl_group_permission_lut ! WHERE group_id = '$ary[group_id]' "; ! debug(__FUNCTION__.__LINE__.".q", $q); $this->db->query($q); $i = 0; + $group_permission_ary = array(); while ($this->db->next_record()) { $group_permission_ary[$i] = $this->db->Record['permission_id']; $i++; } ! $this->group_templ->set_var(array( 'SECTION_ID' => 0, *************** *** 499,504 **** } $this->group_templ->parse("section_rows","section_row",true); ! ! while ( list( $key, $val ) = each( $section_ary ) ) { // $perms_needed = "blockNew && ".$this->db->Record[section_id]; // if( $this->perm->have_perm($perms_needed)) { --- 507,515 ---- } $this->group_templ->parse("section_rows","section_row",true); ! ! $size = 0; ! $countMatches = count($group_section_ary); ! ! foreach ($section_ary as $key => $val) { // $perms_needed = "blockNew && ".$this->db->Record[section_id]; // if( $this->perm->have_perm($perms_needed)) { *************** *** 510,514 **** )); $this->group_templ->set_var('SELECTED',""); ! for ($i = 0 ; $i < count($group_section_ary) ; $i++) { if ($group_section_ary[$i] == $val['id']) { $this->group_templ->set_var('SELECTED',"selected=\"selected\""); --- 521,525 ---- )); $this->group_templ->set_var('SELECTED',""); ! for ($i = 0 ; $i < $countMatches ; $i++) { if ($group_section_ary[$i] == $val['id']) { $this->group_templ->set_var('SELECTED',"selected=\"selected\""); *************** *** 519,533 **** // } } ! if($size > 5) { ! $size = 5; ! } ! ! $this->group_templ->set_block("newgroup","group_row","group_rows"); $groups_ary = $this->getGroups(); - $size = 0; ! ! while ( list( $key, $val ) = each( $groups_ary ) ) { // $perms_needed = "newBlock && ".$this->db->Record[section_name]; // if( $this->perm->have_perm($perms_needed)) { --- 530,541 ---- // } } ! $size = min($size, 5); + $this->group_templ->set_block("newgroup","group_row","group_rows"); $groups_ary = $this->getGroups(); $size = 0; ! $countMatches = count($group_group_ary); ! ! foreach ($groups_ary as $key => $val) { // $perms_needed = "newBlock && ".$this->db->Record[section_name]; // if( $this->perm->have_perm($perms_needed)) { *************** *** 539,543 **** )); $this->group_templ->set_var('SELECTED',""); ! for ($i = 0 ; $i < count($group_group_ary) ; $i++) { if ($group_group_ary[$i] == $val['id']) { $this->group_templ->set_var('SELECTED',"selected=\"selected\""); --- 547,551 ---- )); $this->group_templ->set_var('SELECTED',""); ! for ($i = 0 ; $i < $countMatches ; $i++) { if ($group_group_ary[$i] == $val['id']) { $this->group_templ->set_var('SELECTED',"selected=\"selected\""); *************** *** 545,549 **** } // no circular references ! if( $val['id'] != $ary[group_id]) { $this->group_templ->parse("group_rows","group_row",true); } --- 553,557 ---- } // no circular references ! if( $val['id'] != $ary['group_id']) { $this->group_templ->parse("group_rows","group_row",true); } *************** *** 551,590 **** // } } ! if($size > 5) { ! $size = 5; ! } $this->group_templ->set_block("newgroup","permission_row","permission_rows"); $perm_ary = $this->getPermissions(); $size = 0; ! ! while ( list( $key, $val ) = each( $perm_ary ) ) { // $perms_needed = "newBlock && ".$this->db->Record[section_name]; // if( $this->perm->have_perm($perms_needed)) { ! $this->group_templ->set_var(array( 'PERMISSION_ID' => $val['id'], 'SELECTED' => "", ! 'PERMISSION_NAME' => $val[name] )); ! $this->group_templ->set_var('SELECTED',""); ! for ($i = 0 ; $i < count($group_permission_ary) ; $i++) { ! if ($group_permission_ary[$i] == $val['id']) { ! $this->group_templ->set_var('SELECTED',"selected=\"selected\""); ! } } ! $this->group_templ->parse("permission_rows","permission_row",true); ! $size++; ! // } ! } ! ! if($size > 5) { ! $size = 5; } $this->group_templ->set_var("SIZE", $size); $this->group_templ->set_var("SIZEPERMS", $size); ! ! return $this->group_templ->parse('OUT',array("newgroup")); // $this->group_templ->p('OUT'); --- 559,593 ---- // } } ! $size = min($size, 5); $this->group_templ->set_block("newgroup","permission_row","permission_rows"); $perm_ary = $this->getPermissions(); $size = 0; ! $countMatches = count($group_permission_ary); ! ! foreach ($perm_ary as $key => $val) { // $perms_needed = "newBlock && ".$this->db->Record[section_name]; // if( $this->perm->have_perm($perms_needed)) { ! $this->group_templ->set_var(array( 'PERMISSION_ID' => $val['id'], 'SELECTED' => "", ! 'PERMISSION_NAME' => $val['name'] )); ! $this->group_templ->set_var('SELECTED',""); ! for ($i = 0 ; $i < $countMatches ; $i++) { ! if ($group_permission_ary[$i] == $val['id']) { ! $this->group_templ->set_var('SELECTED',"selected=\"selected\""); } + } ! $this->group_templ->parse("permission_rows","permission_row",true); ! $size++; } + $size = min($size, 5); $this->group_templ->set_var("SIZE", $size); $this->group_templ->set_var("SIZEPERMS", $size); ! ! return $this->group_templ->parse('OUT','newgroup'); // $this->group_templ->p('OUT'); *************** *** 734,746 **** /* We don't test for permission_id because no permission_id means, that this is a new permission. */ ! if ($ary[permission_name] == "") { ! $this->message = "There is no permission_name in Permission.class::savePermission"; ! return false; } ! if ($ary[description] == "") { ! $this->message = "There is no description in Permission.class::savePermission"; return false; } - $ary = clean($ary); --- 737,753 ---- /* We don't test for permission_id because no permission_id means, that this is a new permission. */ ! $isOk = true; ! if ($ary['permission_name'] == "") { ! $this->message .= getError("There is no permission_name in Permission.class::savePermission"); ! $isOk = false; } ! if ($ary['description'] == "") { ! $this->message .= getError("There is no description in Permission.class::savePermission"); ! $isOk = false; ! } ! ! if (!$isOk) { return false; } $ary = clean($ary); *************** *** 756,763 **** permission_description = '$ary[description]' WHERE permission_id = '$ary[permission_id]'"; ! $this->message = "Permission information updated"; } else { ! $ary[permission_id] = generateID("psl_permission_seq"); $q = "INSERT INTO psl_permission --- 763,770 ---- permission_description = '$ary[description]' WHERE permission_id = '$ary[permission_id]'"; ! $this->message .= getMessage('Permission information updated'); } else { ! $ary['permission_id'] = generateID('psl_permission_seq'); $q = "INSERT INTO psl_permission *************** *** 768,772 **** '$ary[permission_name]', '$ary[description]')"; ! $this->message = "Permission information saved"; } --- 775,779 ---- '$ary[permission_name]', '$ary[description]')"; ! $this->message .= getMessage('Permission information saved'); } *************** *** 812,828 **** $group_id = $this->db->Record["group_id"]; $group_name = $this->db->Record["group_name"]; ! $this->message = pslgetText("Sorry, this permission is assigned to group ").$group_name."(".$group_id.")"; } if (!$go_ahead) { ! $this->message .= " Permission not deleted"; return false; } else { ! $q = "DELETE FROM psl_permission WHERE permission_id = '$permission_id'"; $this->db->query($q); ! $this->message = "Permission deleted"; return true; } --- 819,835 ---- $group_id = $this->db->Record["group_id"]; $group_name = $this->db->Record["group_name"]; ! $this->message .= pslgetText("Sorry, this permission is assigned to group ").$group_name."(".$group_id.")"; } if (!$go_ahead) { ! $this->message .= getMessage(" Permission not deleted"); return false; } else { ! $q = "DELETE FROM psl_permission WHERE permission_id = '$permission_id'"; $this->db->query($q); ! $this->message .= getMessage("Permission deleted"); return true; } Index: admin.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/group/admin.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin.php 15 May 2003 18:19:54 -0000 1.2 --- admin.php 2 Jul 2004 15:17:16 -0000 1.3 *************** *** 3,7 **** /* $Id$ */ ! global $_PSL, $HTTP_POST_VARS, $HTTP_GET_VARS, $auth, $perm; AddClassRequirement("group",$_PSL['moduledir'] ."/group/Group.class"); --- 3,7 ---- /* $Id$ */ ! global $_PSL, $auth, $perm; AddClassRequirement("group",$_PSL['moduledir'] ."/group/Group.class"); *************** *** 12,19 **** $xsiteobject = pslgetText("Administration"); // Defines The META TAG Page Type - if (!is_object($sess)) { - page_open($_PSL['page_features']); - } - /***************************** START OF PAGE --- 12,15 ---- *************** *** 26,35 **** $content = ''; ! if(!empty($HTTP_POST_VARS['submit'])) { ! $submit = clean($HTTP_POST_VARS['submit']); ! } elseif (!empty($HTTP_GET_VARS['submit'])) { ! $submit = clean($HTTP_GET_VARS['submit']); ! $group_id = clean($HTTP_GET_VARS['group_id']); ! $permission_id = clean($HTTP_GET_VARS['permission_id']); } else { --- 22,31 ---- $content = ''; ! if (!empty($_POST['submit'])) { ! $submit = clean($_POST['submit']); ! } elseif (!empty($_GET['submit'])) { ! $submit = clean($_GET['submit']); ! $group_id = clean(@$_GET['group_id']); ! $permission_id = clean(@$_GET['permission_id']); } else { *************** *** 64,68 **** case "submit": if ($perm->have_perm("groupSave")) { ! $success = $group->saveGroup($HTTP_POST_VARS); if($success) { $content .= getMessage( pslgetText($group->getMessage())); --- 60,64 ---- case "submit": if ($perm->have_perm("groupSave")) { ! $success = $group->saveGroup($_POST); if($success) { $content .= getMessage( pslgetText($group->getMessage())); *************** *** 86,90 **** case "edit": ! $ary["group_id"] = clean($HTTP_GET_VARS['group_id']); // debug("ary[group_id]", $ary["group_id"]); if ($perm->have_perm("groupEdit")) { --- 82,86 ---- case "edit": ! $ary["group_id"] = clean($_GET['group_id']); // debug("ary[group_id]", $ary["group_id"]); if ($perm->have_perm("groupEdit")) { *************** *** 120,124 **** case "submitperm": if ($perm->have_perm("permissionSave")) { ! $success = $group->savePermission($HTTP_POST_VARS); if($success) { $content .= getMessage( pslgetText($group->getMessage())); --- 116,120 ---- case "submitperm": if ($perm->have_perm("permissionSave")) { ! $success = $group->savePermission($_POST); if($success) { $content .= getMessage( pslgetText($group->getMessage())); *************** *** 142,146 **** case "editperm": ! $ary["permission_id"] = $HTTP_GET_VARS['permission_id']; // debug("ary[permission_id]", $ary["permission_id"]); if ($perm->have_perm("permissionEdit")) { --- 138,142 ---- case "editperm": ! $ary["permission_id"] = $_GET['permission_id']; // debug("ary[permission_id]", $ary["permission_id"]); if ($perm->have_perm("permissionEdit")) { |
From: Peter C. <kr...@us...> - 2004-07-02 15:02:39
|
Update of /cvsroot/phpslash/phpslash-dev/include/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20384 Modified Files: functions.inc Log Message: Move setSkinTpl to use $_SERVER[SERVER_NAME] Index: functions.inc =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/class/functions.inc,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** functions.inc 22 Jun 2004 20:50:53 -0000 1.14 --- functions.inc 2 Jul 2004 15:02:30 -0000 1.15 *************** *** 796,800 **** if(@is_dir($templatedir . "/" . basename($new_skin))) { 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=")); --- 796,800 ---- if(@is_dir($templatedir . "/" . basename($new_skin))) { if( $method == "cookie") { ! setcookie("skin","$new_skin",time()+15552000, "/", ereg_replace("www.", "", $_SERVER['SERVER_NAME'])); if(strstr($_SERVER['QUERY_STRING'], "&skin=")) { $query_string = substr_replace ($_SERVER['QUERY_STRING'], '', strpos($_SERVER['QUERY_STRING'], "&skin=")); *************** *** 808,812 **** $query_string = "?" . $query_string; } ! header("Location: ".$_PSL[phpself].$query_string); } } elseif (@is_dir($templatedir . "/" . basename($_PSL['defaultskin']))) { --- 808,812 ---- $query_string = "?" . $query_string; } ! header("Location: ".$_PSL['phpself'].$query_string); } } elseif (@is_dir($templatedir . "/" . basename($_PSL['defaultskin']))) { *************** *** 814,818 **** // delete the cookie to reset to default skin if (!empty($HTTP_COOKIE_VARS['skin'])) { ! setcookie("skin","", time()+15552000, "/", ereg_replace("www.", "", "$SERVER_NAME")); } } else { --- 814,818 ---- // delete the cookie to reset to default skin if (!empty($HTTP_COOKIE_VARS['skin'])) { ! setcookie("skin","", time()+15552000, "/", ereg_replace("www.", "", $_SERVER['SERVER_NAME'])); } } else { *************** *** 823,827 **** // delete the cookie to reset to default skin if (!empty($HTTP_COOKIE_VARS['skin'])) { ! setcookie("skin","", time()+15552000, "/", ereg_replace("www.", "", "$SERVER_NAME")); } } --- 823,827 ---- // delete the cookie to reset to default skin if (!empty($HTTP_COOKIE_VARS['skin'])) { ! setcookie("skin","", time()+15552000, "/", ereg_replace("www.", "", $_SERVER['SERVER_NAME'])); } } *************** *** 833,837 **** } else { // dir not found, delete this cookie and set to default ! setcookie("skin","", time()+15552000, "/", ereg_replace("www.", "", "$SERVER_NAME")); $new_skin = $_PSL['defaultskin']; } --- 833,837 ---- } else { // dir not found, delete this cookie and set to default ! setcookie("skin","", time()+15552000, "/", ereg_replace("www.", "", $_SERVER['SERVER_NAME'])); $new_skin = $_PSL['defaultskin']; } *************** *** 840,844 **** // delete the cookie to reset to default skin if (!empty($HTTP_COOKIE_VARS['skin'])) { ! setcookie("skin","", time()+15552000, "/", ereg_replace("www.", "", "$SERVER_NAME")); } } else { --- 840,844 ---- // delete the cookie to reset to default skin if (!empty($HTTP_COOKIE_VARS['skin'])) { ! setcookie("skin","", time()+15552000, "/", ereg_replace("www.", "", $_SERVER['SERVER_NAME'])); } } else { *************** *** 849,853 **** // delete the cookie to reset to default skin if (!empty($HTTP_COOKIE_VARS['skin'])) { ! setcookie("skin","", time()+15552000, "/", ereg_replace("www.", "", "$SERVER_NAME")); } } --- 849,853 ---- // delete the cookie to reset to default skin if (!empty($HTTP_COOKIE_VARS['skin'])) { ! setcookie("skin","", time()+15552000, "/", ereg_replace("www.", "", $_SERVER['SERVER_NAME'])); } } |
From: Peter C. <kr...@us...> - 2004-06-22 21:09:15
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/block/blocktypes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23877/include/modules/block/blocktypes Modified Files: Block_render_query.class Block_render_section.class Block_render_skin.class Log Message: Notice squashing, updates to comments and minor tidy-ups Index: Block_render_query.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/block/blocktypes/Block_render_query.class,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Block_render_query.class 15 May 2003 18:19:54 -0000 1.2 --- Block_render_query.class 22 Jun 2004 21:09:04 -0000 1.3 *************** *** 41,52 **** function query( $block_info) { AddClassRequirement("story_base",$this->psl['moduledir'] . "/story/Story_base.class"); $stories = pslNew("Story_base"); ! $amp = $this->psl['amp']; $site_homesection = $this->psl['site_homesection']; ! $default_template = 'queryblock.tpl'; ! $options_ary = split( '&',$block_info['source_url'] ); for( $i=0 ; $i < count($options_ary) ; $i++) { --- 41,56 ---- function query( $block_info) { + // At top to prevent accidental overriding of variables + $options = $block_info['source_url']; + parse_str($options); + AddClassRequirement("story_base",$this->psl['moduledir'] . "/story/Story_base.class"); $stories = pslNew("Story_base"); ! $amp = $this->psl['amp']; $site_homesection = $this->psl['site_homesection']; ! $default_template = 'queryblock.tpl'; ! $options_ary = split( '&',$block_info['source_url'] ); for( $i=0 ; $i < count($options_ary) ; $i++) { *************** *** 57,70 **** $template = pslNew("slashTemplate",$this->psl['templatedir']); $template->debug = 0; ! ! if( $tpl == '') { $template->set_file( 'template', $default_template); ! } elseif ( $template->set_file('template' , basename($tpl) . ".tpl" )) { } else { $template->set_file( 'template', $default_template); ! } ! $template->set_block ('template', 'each_query', 'query_block'); ! $stories_ary = $stories->extractStories( $ary); --- 61,74 ---- $template = pslNew("slashTemplate",$this->psl['templatedir']); $template->debug = 0; ! ! if (empty($tpl)) { $template->set_file( 'template', $default_template); ! } elseif ( $template->set_file('template' , basename($tpl) . ".tpl" )) { } else { $template->set_file( 'template', $default_template); ! } ! $template->set_block ('template', 'each_query', 'query_block'); ! $stories_ary = $stories->extractStories( $ary); Index: Block_render_section.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/block/blocktypes/Block_render_section.class,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Block_render_section.class 12 Mar 2003 16:12:55 -0000 1.1.1.1 --- Block_render_section.class 22 Jun 2004 21:09:04 -0000 1.2 *************** *** 1,142 **** ! <?php ! ! /* Block_render_section.class -> Methods for phpslash specfic blocks */ ! /* $Id$ */ ! ! /** ! * Creates a block that lists all sections (with stories) ! * ! * pass the query in the "Source Url" form field in the format of: ! * ! * option1=setting1&option2=setting2 ! * ! * Available query options: ! * ! * mode = all [] show all sections ( even those with no stories) ! * section_id = limit returned data to this section_id ! * section = limit returned data to this section ! * tpl = template filename [sectionsblock] (no path or extension) ! */ ! ! ! class Block_render_section extends Block_render_i { ! ! /* ! * private variables ! */ ! var $type; ! var $output; ! var $psl; ! ! /** ! * constructor ! */ ! function Block_render_section() { ! $this->Block_render_i(); ! ! $this->type = 'section'; /* set the 'type' */ ! $this->description = "A block that displays links to all sections which contain stories"; ! } ! ! /** ! * Creates the html and saves it in $this->output ! *@param array $block_info ! *@return bool ! *@access public ! */ ! function parse( $block_info) { ! $this->output = $this->sections( $block_info); ! return 1; ! } ! ! /** ! * Creates the html ! *@param array $block_info $block_info[source_url] contains display options ! @see class comments for values for $block_info[source_url] ! *@return htmlstring ! *@access private ! */ ! function sections( $block_info) { ! ! $db = pslNew("slashDB"); ! $mode = ''; ! ! $default_template = "sectionsblock.tpl"; ! $site_homesection = 'Home'; ! ! if( !empty($this->psl['site_homesection'])) { ! $site_homesection = $this->psl['site_homesection']; ! } ! ! $link_prefix = '?section_id='; ! ! $options = $block_info['source_url']; ! ! parse_str( $options); ! ! $template = pslNew("slashTemplate"); ! $template->debug = 0; ! ! if( $tpl == '') { ! $template->set_file( 'template', $default_template); ! } elseif ( $template->set_file('template' , basename($tpl) . ".tpl" )) { ! } else { ! $template->set_file( 'template', $default_template); ! } ! ! $template->set_block ('template', 'each_section', 'section_block'); ! $template->set_var (array ( ! 'SECTION_VALUE' => "", ! 'SECTION_TEXT' => "" ! )); ! ! ! $q = "SELECT DISTINCT psl_section.section_id, ! psl_section.section_name, ! psl_section.description ! FROM psl_section "; ! /* "all" will show sections that don't have any stories */ ! if ( $mode != "all") { ! $q .= ", psl_section_lut ! WHERE psl_section.section_id = psl_section_lut.section_id "; ! if ( isset($section_id)) { ! $q .= " AND psl_section.section_id = '$section_id' "; ! } elseif( isset($section)) { ! $q .= " AND psl_section.section_name = '$section' "; ! } ! } ! ! $q .= " ORDER BY section_name"; ! ! $db->query($q); ! ! while ($db->next_record()) { ! ! if ( $db->Record['section_name'] == $site_homesection) { ! $section_link = ""; ! } else { ! $section_link = $link_prefix . $db->Record['section_id']; ! } ! ! $template->set_var (array ( ! 'SECTION_LINK' => $section_link, ! 'SECTION_NAME' => $db->Record['section_name'], ! 'DESCRIPTION' => $db->Record['description'] ! )); ! $template->parse ("section_block", "each_section", true); ! } ! ! $template->set_var(array( ! 'ROOTDIR' => $this->psl['rooturl'], ! 'IMAGEDIR' => $this->psl['imageurl'], ! 'MAINPAGE' => $this->psl['mainpage'] ! )); ! ! unset($db); ! return $template->parse('OUT','template'); ! ! } ! ! } ! ! ?> --- 1,142 ---- ! <?php ! ! /* Block_render_section.class -> Methods for phpslash specfic blocks */ ! /* $Id$ */ ! ! /** ! * Creates a block that lists all sections (with stories) ! * ! * pass the query in the "Source Url" form field in the format of: ! * ! * option1=setting1&option2=setting2 ! * ! * Available query options: ! * ! * mode = all [] show all sections ( even those with no stories) ! * section_id = limit returned data to this section_id ! * section = limit returned data to this section ! * tpl = template filename [sectionsblock] (no path or extension) ! */ ! ! ! class Block_render_section extends Block_render_i { ! ! /* ! * private variables ! */ ! var $type; ! var $output; ! var $psl; ! ! /** ! * constructor ! */ ! function Block_render_section() { ! $this->Block_render_i(); ! ! $this->type = 'section'; /* set the 'type' */ ! $this->description = "A block that displays links to all sections which contain stories"; ! } ! ! /** ! * Creates the html and saves it in $this->output ! *@param array $block_info ! *@return bool ! *@access public ! */ ! function parse( $block_info) { ! $this->output = $this->sections( $block_info); ! return 1; ! } ! ! /** ! * Creates the html ! *@param array $block_info $block_info[source_url] contains display options ! @see class comments for values for $block_info[source_url] ! *@return htmlstring ! *@access private ! */ ! function sections( $block_info) { ! ! // At top to prevent accidental overriding of variables ! $options = $block_info['source_url']; ! parse_str($options); ! ! $db = pslNew("slashDB"); ! $mode = ''; ! ! $default_template = "sectionsblock.tpl"; ! $site_homesection = 'Home'; ! ! if (!empty($this->psl['site_homesection'])) { ! $site_homesection = $this->psl['site_homesection']; ! } ! ! $link_prefix = '?section_id='; ! ! $template = pslNew("slashTemplate"); ! $template->debug = 0; ! ! if (empty($tpl)) { ! $template->set_file( 'template', $default_template); ! } elseif ( $template->set_file('template' , basename($tpl) . ".tpl" )) { ! } else { ! $template->set_file( 'template', $default_template); ! } ! ! $template->set_block ('template', 'each_section', 'section_block'); ! $template->set_var (array ( ! 'SECTION_VALUE' => "", ! 'SECTION_TEXT' => "" ! )); ! ! ! $q = "SELECT DISTINCT psl_section.section_id, ! psl_section.section_name, ! psl_section.description ! FROM psl_section "; ! /* "all" will show sections that don't have any stories */ ! if ( $mode != "all") { ! $q .= ", psl_section_lut ! WHERE psl_section.section_id = psl_section_lut.section_id "; ! if ( isset($section_id)) { ! $q .= " AND psl_section.section_id = '$section_id' "; ! } elseif( isset($section)) { ! $q .= " AND psl_section.section_name = '$section' "; ! } ! } ! ! $q .= " ORDER BY section_name"; ! ! $db->query($q); ! ! while ($db->next_record()) { ! ! if ( $db->Record['section_name'] == $site_homesection) { ! $section_link = ""; ! } else { ! $section_link = $link_prefix . $db->Record['section_id']; ! } ! ! $template->set_var (array ( ! 'SECTION_LINK' => $section_link, ! 'SECTION_NAME' => $db->Record['section_name'], ! 'DESCRIPTION' => $db->Record['description'] ! )); ! $template->parse ("section_block", "each_section", true); ! } ! ! $template->set_var(array( ! 'ROOTDIR' => $this->psl['rooturl'], ! 'IMAGEDIR' => $this->psl['imageurl'], ! 'MAINPAGE' => $this->psl['mainpage'] ! )); ! ! unset($db); ! return $template->parse('OUT','template'); ! ! } ! ! } ! ! ?> Index: Block_render_skin.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/block/blocktypes/Block_render_skin.class,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Block_render_skin.class 12 Mar 2003 16:12:55 -0000 1.1.1.1 --- Block_render_skin.class 22 Jun 2004 21:09:05 -0000 1.2 *************** *** 35,45 **** function skin( $block_info) { $db = pslNew("SlashDB"); - - $default_template = "skinsblock.tpl"; ! $options = $block_info["source_url"]; ! ! parse_str( $options); if ($this->psl['skin']) { --- 35,45 ---- function skin( $block_info) { + // At top to prevent accidental overriding of variables + $options = $block_info['source_url']; + parse_str($options); + $db = pslNew("SlashDB"); ! $default_template = "skinsblock.tpl"; if ($this->psl['skin']) { *************** *** 49,57 **** $this->psl['templatedir]'] .= $skin; } ! ! 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'])){ --- 49,56 ---- $this->psl['templatedir]'] .= $skin; } ! 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'])){ *************** *** 63,74 **** $template = pslNew("slashTemplate"); $template->debug = 0; ! ! if( $tpl == '') { $template->set_file( 'template', $default_template); ! } elseif ( $template->set_file('template' , basename($tpl) . ".tpl" )) { } else { $template->set_file( 'template', $default_template); ! } ! $template->set_block ("template", "each_skin", "skin_block"); $template->set_var (array ( --- 62,73 ---- $template = pslNew("slashTemplate"); $template->debug = 0; ! ! if (empty($tpl)) { $template->set_file( 'template', $default_template); ! } elseif ( $template->set_file('template' , basename($tpl) . ".tpl" )) { } else { $template->set_file( 'template', $default_template); ! } ! $template->set_block ("template", "each_skin", "skin_block"); $template->set_var (array ( |
From: Peter C. <kr...@us...> - 2004-06-22 21:09:14
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/search In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23877/include/modules/search Modified Files: index.php Log Message: Notice squashing, updates to comments and minor tidy-ups Index: index.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/search/index.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** index.php 19 Jun 2004 14:33:24 -0000 1.3 --- index.php 22 Jun 2004 21:09:05 -0000 1.4 *************** *** 90,93 **** --- 90,94 ---- } } + function getSectionID ($id, $name) { *************** *** 125,129 **** } ! #$ary = array(); if(!empty($_GET)) { $ary = clean($_GET); --- 126,130 ---- } ! $ary = array(); if(!empty($_GET)) { $ary = clean($_GET); |
From: Peter C. <kr...@us...> - 2004-06-22 21:09:13
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/block In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23877/include/modules/block Modified Files: admin.php Log Message: Notice squashing, updates to comments and minor tidy-ups Index: admin.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/block/admin.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** admin.php 13 Nov 2003 12:16:50 -0000 1.4 --- admin.php 22 Jun 2004 21:09:04 -0000 1.5 *************** *** 19,27 **** $xsiteobject = pslgetText("Administration"); ! /* Open the page with session variables enabled */ if (!is_object($sess)) { page_open($_PSL['page_features']); } ! /* Start Block Object */ $block = pslNew("Block_admin"); --- 19,27 ---- $xsiteobject = pslgetText("Administration"); ! /* Open the page with session variables enabled if (!is_object($sess)) { page_open($_PSL['page_features']); } ! Not needed since page_open is now guaranteed to have been called by now */ /* Start Block Object */ $block = pslNew("Block_admin"); |
From: Peter C. <kr...@us...> - 2004-06-22 21:09:13
|
Update of /cvsroot/phpslash/phpslash-dev/include/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23877/include/class Modified Files: NavBar.class Log Message: Notice squashing, updates to comments and minor tidy-ups Index: NavBar.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/class/NavBar.class,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** NavBar.class 12 Mar 2003 16:12:50 -0000 1.1.1.1 --- NavBar.class 22 Jun 2004 21:09:04 -0000 1.2 *************** *** 9,15 **** * Desc.: The navigation bar shown on top of all our pages * ! * NOTES/TO-DO: Get rid of global's ! * Make URIs (GET)session-aware (post 0.6?) ! * */ class NavBar { --- 9,15 ---- * Desc.: The navigation bar shown on top of all our pages * ! * NOTES/TO-DO: Make URIs (GET)session-aware (post 0.6?) ! * @todo Replace by Block_render_navBar (pac - June 2004) ! * */ class NavBar { *************** *** 42,46 **** * Internal (private) function only. Should not be used outside this class */ ! function parse ($text,$link) { $this->templ->set_var( array( --- 42,46 ---- * Internal (private) function only. Should not be used outside this class */ ! function parse($text,$link) { $this->templ->set_var( array( *************** *** 56,60 **** * Returns the HTML for the NavBar */ ! function getNavBar ($tpl="", $menu_ary="") { global $auth, $perm; --- 56,60 ---- * Returns the HTML for the NavBar */ ! function getNavBar($tpl="", $menu_ary="") { global $auth, $perm; |
From: Peter C. <kr...@us...> - 2004-06-22 20:58:33
|
Update of /cvsroot/phpslash/phpslash-dev/include/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16184/include/class Modified Files: slashAuth.class Log Message: Experimental: slashAuth now uses index1col.tpl to structure the login form - making layout more compatible with the other pages. Would be nice to move to using the proper page layout mechanism... Index: slashAuth.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/class/slashAuth.class,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** slashAuth.class 23 Apr 2004 17:58:40 -0000 1.4 --- slashAuth.class 22 Jun 2004 20:58:24 -0000 1.5 *************** *** 1,5 **** <?php ! /* $Id$ * * Provides the authorization functions of PHPSlash --- 1,5 ---- <?php ! /* $Id$ * * Provides the authorization functions of PHPSlash *************** *** 7,11 **** * Extends the phplib auth class. * ! * Quoting the phplib local.inc * * "A variation of Auth which uses a Challenge-Response --- 7,11 ---- * Extends the phplib auth class. * ! * Quoting the phplib local.inc * * "A variation of Auth which uses a Challenge-Response *************** *** 15,18 **** --- 15,19 ---- * what is going on." * + * NOTE: This class does NOT use the PSL page layout engine */ class slashAuth_base extends Auth { *************** *** 52,71 **** function start() { ! global $_PSL, $HTTP_GET_VARS, $sess; $this->psl = &$_PSL; $this->sess = &$sess; ! // If the magic word is defined in the config file - use it. if(!empty($_PSL['magic'])) { $this->magic = $_PSL['magic']; } ! AddClassRequirement("author",$_PSL['moduledir'] ."/". $_PSL['module']['Author'] ."/Author.class"); ! $this->loadClasses("database_class"); // setup registration mode or login only ! if (!empty($HTTP_GET_VARS['mode']) && $HTTP_GET_VARS['mode']=='reg') { if( !empty($_PSL['auth.mode'])) { $this->mode = $_PSL['auth.mode']; --- 53,72 ---- function start() { ! global $_PSL, $sess; $this->psl = &$_PSL; $this->sess = &$sess; ! // If the magic word is defined in the config file - use it. if(!empty($_PSL['magic'])) { $this->magic = $_PSL['magic']; } ! AddClassRequirement("author",$_PSL['moduledir'] ."/". $_PSL['module']['Author'] ."/Author.class"); ! $this->loadClasses("database_class"); // setup registration mode or login only ! if (!empty($_GET['mode']) && $_GET['mode']=='reg') { if( !empty($_PSL['auth.mode'])) { $this->mode = $_PSL['auth.mode']; *************** *** 88,101 **** /** ! * auth_loginform - displays the login form. * * @return void */ function auth_loginform() { ! global $challenge, $HTTP_GET_VARS, $HTTP_POST_VARS, $sess, $saved_get, $saved_post; // preserve the POST variable through the login process ! $saved_post = $HTTP_POST_VARS; ! $saved_get = $HTTP_GET_VARS; $sess->register("saved_post"); --- 89,104 ---- /** ! * auth_loginform - displays the login form ! * ! * @todo: Move to Block_render_login * * @return void */ function auth_loginform() { ! global $challenge, $sess, $saved_get, $saved_post; // preserve the POST variable through the login process ! $saved_post = $_POST; ! $saved_get = $_GET; $sess->register("saved_post"); *************** *** 103,107 **** // generate a challenge word if needed. ! if(empty($challenge)) { $challenge = md5(uniqid($this->magic)); $sess->register("challenge"); --- 106,110 ---- // generate a challenge word if needed. ! if (empty($challenge)) { $challenge = md5(uniqid($this->magic)); $sess->register("challenge"); *************** *** 111,118 **** $templ = pslNew("slashTemplate"); $templ->set_file(array( ! 'form' => "loginformCR.tpl" )); ! $templ->set_var( array( // 'ACTION_URL' => $this->psl['rooturl'] . "/login.php", 'ACTION_URL' => $this->psl['phpself'], --- 114,122 ---- $templ = pslNew("slashTemplate"); $templ->set_file(array( ! 'form' => 'loginformCR.tpl', ! 'index' => 'index1col.tpl' )); ! $templ->set_var( array( // 'ACTION_URL' => $this->psl['rooturl'] . "/login.php", 'ACTION_URL' => $this->psl['phpself'], *************** *** 121,125 **** 'CHALLENGE' => $challenge )); ! // Display the previously used name in the form field if (isset($this->auth["uname"]) && $this->auth["uname"] != "nobody") { --- 125,129 ---- 'CHALLENGE' => $challenge )); ! // Display the previously used name in the form field if (isset($this->auth["uname"]) && $this->auth["uname"] != "nobody") { *************** *** 136,140 **** $templ->set_var('ERROR', ""); } ! // Link to registration screen if enabled $templ->set_block("form","reg_block","regblock"); --- 140,144 ---- $templ->set_var('ERROR', ""); } ! // Link to registration screen if enabled $templ->set_block("form","reg_block","regblock"); *************** *** 143,154 **** } - // display - slashhead("Login", "Login"); AddClassRequirement("navbar",$this->psl['classdir'] . "/NavBar.class"); $navbar = pslNew("NavBar"); ! echo $navbar->getNavBar(); ! $templ->pparse('OUT',"form"); ! slashfoot(); ! } --- 147,162 ---- } AddClassRequirement("navbar",$this->psl['classdir'] . "/NavBar.class"); $navbar = pslNew("NavBar"); ! ! // display ! $templ->set_var(array( ! 'TOP' => getHeader('Login', 'Login') . $navbar->getNavBar('navbarBlockh'), ! 'CENTER_BLOCK_COLUMN' => $templ->parse('form','form'), ! 'BOTTOM' => getFooter() ! )); ! ! $templ->pparse('OUT','index'); ! } *************** *** 160,174 **** function auth_preauth() { ! global $HTTP_COOKIE_VARS, $sess; // debug("auth", "preauth"); // The preauth cookie is called 'user_info' ! if( !empty($HTTP_COOKIE_VARS['user_info'])){ // generate the challenge we expect ! $cookie_challenge = md5($this->magic .":". $this->psl['basedir']); // decode the cookie data into an array ! $cookie_ary = unserialize(base64_decode($HTTP_COOKIE_VARS['user_info'])); # assume the check is gonna fail --- 168,182 ---- function auth_preauth() { ! global $sess; // debug("auth", "preauth"); // The preauth cookie is called 'user_info' ! if( !empty($_COOKIE['user_info'])){ // generate the challenge we expect ! $cookie_challenge = md5($this->magic .":". $this->psl['basedir']); // decode the cookie data into an array ! $cookie_ary = unserialize(base64_decode($_COOKIE['user_info'])); # assume the check is gonna fail *************** *** 253,261 **** function auth_validatelogin() { ! global $HTTP_POST_VARS, $HTTP_GET_VARS, $saved_get, $saved_post, $challenge, $sess; // If no POST variables this must be an error or user // abandoned a login form to return to a public area of site ! if(empty($HTTP_POST_VARS)) { // This will happen when abandoning a login form // need to load the data for the 'nobody' user. --- 261,269 ---- function auth_validatelogin() { ! global $saved_get, $saved_post, $challenge, $sess; // If no POST variables this must be an error or user // abandoned a login form to return to a public area of site ! if(empty($_POST)) { // This will happen when abandoning a login form // need to load the data for the 'nobody' user. *************** *** 275,301 **** // set form entries to local variables ! $username = $HTTP_POST_VARS['username']; $password = ''; ! if(array_key_exists('password', $HTTP_POST_VARS)) { ! $password = $HTTP_POST_VARS['password']; } ! // $challenge = $HTTP_POST_VARS['challenge']; // use session variable ! $response = $HTTP_POST_VARS['response']; ! if(!empty($HTTP_POST_VARS['setcookie'])) { ! $setcookie = $HTTP_POST_VARS['setcookie']; } ! if(!empty($HTTP_POST_VARS['lostpw'])) { ! $lostpw = $HTTP_POST_VARS['lostpw']; } ! // missing challenge - shouldn't happen ! if(empty($HTTP_POST_VARS['challenge'])) { // $this->auth["error"] = "debug only - missing challenge"; return false; } ! ! // old loginforms expire - prevents hitting "back" or // "refresh" to login ! if($challenge != $HTTP_POST_VARS['challenge']) { // $this->auth["error"] = "debug only - wrong challenge"; return false; --- 283,309 ---- // set form entries to local variables ! $username = $_POST['username']; $password = ''; ! if(array_key_exists('password', $_POST)) { ! $password = $_POST['password']; } ! // $challenge = $_POST['challenge']; // use session variable ! $response = $_POST['response']; ! if(!empty($_POST['setcookie'])) { ! $setcookie = $_POST['setcookie']; } ! if(!empty($_POST['lostpw'])) { ! $lostpw = $_POST['lostpw']; } ! // missing challenge - shouldn't happen ! if(empty($_POST['challenge'])) { // $this->auth["error"] = "debug only - missing challenge"; return false; } ! ! // old loginforms expire - prevents hitting "back" or // "refresh" to login ! if($challenge != $_POST['challenge']) { // $this->auth["error"] = "debug only - wrong challenge"; return false; *************** *** 313,323 **** // check for missing name or other shenanigans ! if ($username == "" || strstr($username,"'")) { // spit out empty login form $this->auth["error"] = pslgetText("Either your username or password are invalid. Please try again."); return false; } ! ! // If the "Lost password" reminder is checked - call the // method in Author class. if( $lostpw) { --- 321,331 ---- // check for missing name or other shenanigans ! if ($username == "" || strstr($username,"'")) { // spit out empty login form $this->auth["error"] = pslgetText("Either your username or password are invalid. Please try again."); return false; } ! ! // If the "Lost password" reminder is checked - call the // method in Author class. if( $lostpw) { *************** *** 330,337 **** // assume the check is gonna fail ! $uid = false; ! $user_info = $this->get_psluser_info($username); ! // username not found - return failure if ($user_info == false) { --- 338,345 ---- // assume the check is gonna fail ! $uid = false; ! $user_info = $this->get_psluser_info($username); ! // username not found - return failure if ($user_info == false) { *************** *** 347,351 **** // auth type specific validation ! // psl built in Challenge Response // other auth methods can return true or false for validation results $is_user = $this->psl_validate($username, $password, $response, $user_info); --- 355,359 ---- // auth type specific validation ! // psl built in Challenge Response // other auth methods can return true or false for validation results $is_user = $this->psl_validate($username, $password, $response, $user_info); *************** *** 353,357 **** // Drop password for safety $password=''; ! $HTTP_POST_VARS['password'] = ''; if ($is_user == false) { --- 361,365 ---- // Drop password for safety $password=''; ! $_POST['password'] = ''; if ($is_user == false) { *************** *** 360,364 **** return false; } else { ! // success - authenticated // set Remember Me cookie --- 368,372 ---- return false; } else { ! // success - authenticated // set Remember Me cookie *************** *** 371,375 **** if(!empty($temparray['preferences'])){ $this->auth['preferences'] = $temparray['preferences']; ! $this->use_preferences(); } --- 379,383 ---- if(!empty($temparray['preferences'])){ $this->auth['preferences'] = $temparray['preferences']; ! $this->use_preferences(); } *************** *** 381,386 **** // restore saved POST variables ! $HTTP_GET_VARS = $saved_get; ! $HTTP_POST_VARS = $saved_post; // clear the session variables --- 389,394 ---- // restore saved POST variables ! $_GET = $saved_get; ! $_POST = $saved_post; // clear the session variables *************** *** 391,395 **** // get rid of session variables and use the db author record. $this->clear_session_vars(); ! // expire cache for this session if(function_exists('jpcache_gc')) { --- 399,403 ---- // get rid of session variables and use the db author record. $this->clear_session_vars(); ! // expire cache for this session if(function_exists('jpcache_gc')) { *************** *** 399,406 **** // signal success by returning user id return $uid; ! } ! $this->auth["error"] = pslgetText("Either your username or password are invalid. Please try again."); ! return false; } --- 407,414 ---- // signal success by returning user id return $uid; ! } ! $this->auth["error"] = pslgetText("Either your username or password are invalid. Please try again."); ! return false; } *************** *** 409,412 **** --- 417,422 ---- * auth_registerform - displays the registration form. * + * @todo Move to new class: Block_render_registerform + * * @return void */ *************** *** 462,471 **** // display the form ! slashhead("Register", "Register"); AddClassRequirement("navbar",$this->psl['classdir'] . "/NavBar.class"); $navbar = pslNew("NavBar"); echo $navbar->getNavBar(); $templ->pparse(OUT,"form"); ! slashfoot(); } --- 472,482 ---- // display the form ! // - see auth_loginform for an example of how to make the screen look more consistent ! echo getHeader("Register", "Register"); AddClassRequirement("navbar",$this->psl['classdir'] . "/NavBar.class"); $navbar = pslNew("NavBar"); echo $navbar->getNavBar(); $templ->pparse(OUT,"form"); ! echo getFooter(); } *************** *** 477,498 **** function auth_doregister() { ! global $HTTP_POST_VARS, $challenge, $response; // if no POST variables, this must be an error ! if(empty($HTTP_POST_VARS)) { return false; } // save the entered data - to display the form again with data ! $this->auth["uname"] = $username = $HTTP_POST_VARS['username']; ! $this->auth["realname"] = $realname = $HTTP_POST_VARS['realname']; ! $this->auth["email"] = $email = $HTTP_POST_VARS['email']; ! $this->auth["url"] = $url = $HTTP_POST_VARS['url']; ! $this->auth["quote"] = $quote = $HTTP_POST_VARS['quote']; ! $this->auth["seclev"] = $seclev = $HTTP_POST_VARS['seclev']; // password is not saved in the session ! $pass1 = $HTTP_POST_VARS['pass1']; ! $pass2 = $HTTP_POST_VARS['pass2']; // if form empty - complain --- 488,509 ---- function auth_doregister() { ! global $challenge, $response; // if no POST variables, this must be an error ! if(empty($_POST)) { return false; } // save the entered data - to display the form again with data ! $this->auth["uname"] = $username = $_POST['username']; ! $this->auth["realname"] = $realname = $_POST['realname']; ! $this->auth["email"] = $email = $_POST['email']; ! $this->auth["url"] = $url = $_POST['url']; ! $this->auth["quote"] = $quote = $_POST['quote']; ! $this->auth["seclev"] = $seclev = $_POST['seclev']; // password is not saved in the session ! $pass1 = $_POST['pass1']; ! $pass2 = $_POST['pass2']; // if form empty - complain *************** *** 531,535 **** // $this->auth["perm"] = $this->get_userperms($uid); return $uid; ! } // If user is present and password does not match, // complain and fail. --- 542,546 ---- // $this->auth["perm"] = $this->get_userperms($uid); return $uid; ! } // If user is present and password does not match, // complain and fail. *************** *** 559,567 **** // $password = $pass1; ! $HTTP_POST_VARS['username'] = $username; ! $HTTP_POST_VARS['password'] = $pass1; ! // $HTTP_POST_VARS['challenge'] = md5(uniqid($this->magic)); ! $HTTP_POST_VARS['challenge'] = $challenge; ! $HTTP_POST_VARS['response'] = ''; // debug("username", $username); // debug("pass1", $pass1); --- 570,578 ---- // $password = $pass1; ! $_POST['username'] = $username; ! $_POST['password'] = $pass1; ! // $_POST['challenge'] = md5(uniqid($this->magic)); ! $_POST['challenge'] = $challenge; ! $_POST['response'] = ''; // debug("username", $username); // debug("pass1", $pass1); |
From: Peter C. <kr...@us...> - 2004-06-22 20:58:32
|
Update of /cvsroot/phpslash/phpslash-dev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16184 Modified Files: CHANGES Log Message: Experimental: slashAuth now uses index1col.tpl to structure the login form - making layout more compatible with the other pages. Would be nice to move to using the proper page layout mechanism... Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/CHANGES,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** CHANGES 19 Jun 2004 14:39:00 -0000 1.72 --- CHANGES 22 Jun 2004 20:58:24 -0000 1.73 *************** *** 13,16 **** --- 13,28 ---- 9 - Removal of something (kill -9 :) + 2004-June 22 Peter Cruickshank <kr...@us...> + [E] - slashAuth now uses index1col.tpl to structure the login form - making layout + more compatible with the other pages. Would be nice to move to using the + proper page layout mechanism... + Also: Switch to using $_GET and $_POST + + 2004-June 22 Peter Cruickshank <kr...@us...> + [W] - function.inc Block_render_page.class - Reorganised and grouped functions + removing old and unused functions + Future plan to move slashhead and slashfoot to Block_render_header/footer + once dependency in slashAuth has been removed + 2004 June 18 Peter Cruickshank <kr...@us...> [B] - search/index.php - Fixed bug where search module was not picking up |
From: Peter C. <kr...@us...> - 2004-06-22 20:51:02
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/block/blocktypes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7392/include/modules/block/blocktypes Modified Files: Block_render_page.class Log Message: Reorganised and grouped functions removing old and unused functions Index: Block_render_page.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/block/blocktypes/Block_render_page.class,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Block_render_page.class 4 Jun 2003 20:02:45 -0000 1.4 --- Block_render_page.class 22 Jun 2004 20:50:53 -0000 1.5 *************** *** 42,46 **** // setup variables to be displayed ! $breadcrumb = breadcrumb($ary); if(is_object($GLOBALS['block'])) { --- 42,46 ---- // setup variables to be displayed ! $breadcrumb = $this->breadcrumb($ary); if(is_object($GLOBALS['block'])) { *************** *** 107,110 **** --- 107,228 ---- } + + + /** + * Generate string linking current page back to parents + * + * Sets global name variables + * + * @param array $ary cmd line array + * @global $_PSL['rooturl'] Used not changed + * @global $_PSL['phpself'] Used not changed + * @global $_PSL['mainpage'] Used not changed + * @global $_PSL['home_section_id'] Used not changed + * @global $_PSL['author'] Updated to author id if present in $ary + * @global $_PSL['section'] Updated to section id if present in $ary + * @global $_PSL['topic'] Updated to topic id if present in $ary + * @return htmlstring templated html for a "breadcrumb" link and + */ + function breadcrumb ($ary) { + + global $_PSL; + + $as = $_PSL['amp']; + if (!empty($ary['section_id'])) { + AddClassRequirement("section",$_PSL['moduledir'] ."/". $_PSL['module']['Section'] ."/Section.class"); + $sec = pslNew("Section"); + $ary['section'] = $sec->getName($ary['section_id']); + $_PSL['section'] = $ary['section']; + } else { // if there's no section_id, then default to home_section_id. + $ary['section_id'] = $_PSL['home_section_id']; + } + + if (!empty($ary['topic_id'])) { + AddClassRequirement("topic",$_PSL['moduledir'] ."/". $_PSL['module']['Topic'] ."/Topic.class"); + $top = pslNew("Topic"); + $ary['topic'] = $top->getName($ary['topic_id']); + $_PSL['topic'] = $ary['topic']; + } + if (!empty($ary['author_id'])) { + AddClassRequirement("author",$_PSL['moduledir'] ."/". $_PSL['module']['Author'] ."/Author.class"); + $author = pslNew("Author"); + $ary['author'] = $author->getName($ary['author_id']); + $_PSL['author'] = $ary['author']; + } + + if( ($ary['section_id'] != $_PSL['home_section_id']) OR + (!empty($ary['topic_id'])) OR + (!empty($ary['author_id'])) ) { + + $delimiter = $_PSL['breadcrumb.delimiter']; + ; + $section_link = ""; + $topic_link = ""; + + $template = pslNew("slashTemplate"); + $template->debug = 0; + $template->set_file('breadcrumb', "breadcrumb.tpl"); + + $template->set_block ("breadcrumb", "each_crumb", "crumb_block"); + + /* setup the first link to the homepage */ + $template->set_var(array( + 'PHP_SELF' => $_PSL['phpself'], + 'DELIMETER' => "", + 'LINK' => "", + 'NAME' => pslgetText("Home"), + 'ROOTURL' => $_PSL['rooturl'], + 'MAINPAGE' => $_PSL['mainpage'] + )); + + $template->parse ("crumb_block", "each_crumb", true); + + if ($ary['section_id'] != $_PSL['home_section_id']) { + + $template->set_var(array( + 'DELIMETER' => $delimiter, + 'LINK' => "?section_id=" . $ary['section_id'], + 'NAME' => $ary['section'] + )); + $section_link = $as . "section_id=" . $ary['section_id']; + $template->parse ("crumb_block", "each_crumb", true); + + } + + if (!empty($ary['topic_id'])) { + + $template->set_var(array( + 'DELIMETER' => $delimiter, + 'LINK' => "?topic_id=" . $ary['topic_id'] . $section_link, + 'NAME' => $ary['topic'] + )); + $topic_link = $as . "topic_id=" . $ary['topic_id']; + $template->parse ("crumb_block", "each_crumb", true); + + } + + if (!empty($ary['author_id'])) { + + $template->set_var(array( + 'DELIMETER' => $delimiter, + 'LINK' => "?author_id=" . $ary['author_id'] . $section_link . $topic_link, + 'NAME' => $ary['author'] + )); + $template->parse ("crumb_block", "each_crumb", true); + + } + + $breadcrumb = $template->parse('OUT',"breadcrumb"); + + } else { + + $breadcrumb = ""; + } + + return $breadcrumb; + + } /* end of function breadcrumb */ + + } |
From: Peter C. <kr...@us...> - 2004-06-22 20:51:02
|
Update of /cvsroot/phpslash/phpslash-dev/include/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7392/include/class Modified Files: functions.inc Log Message: Reorganised and grouped functions removing old and unused functions Index: functions.inc =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/class/functions.inc,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** functions.inc 4 Mar 2004 21:45:16 -0000 1.13 --- functions.inc 22 Jun 2004 20:50:53 -0000 1.14 *************** *** 4,8 **** --- 4,101 ---- * * @version $Id$ + * + * THE FUNCTIONS HAVE MOVED AROUND!! + * June 2004 - There's been a bit of a rationalisation of this file - you might have notcied! + * This is a detailed list of how things are grouped. Feel free to suggest new sections (or changes + * to categorisations, but when you add a new function, please try to put it in the right place! + * + * HTML FORMATTING: ERRORS AND MESSAGES [...3133 lines suppressed...] + + /** + * return a string detailing structure of $var + * + * @author Matthew Leingang (sym...@us...) + * @require output buffering (built into PHP4) + * @see print_r + * @access public + * @param mixed + * @return string + */ + function get_r($var) { + ob_start(); + print_r($var); + $ans = ob_get_contents(); + ob_end_clean(); + return $ans; + } + ?> |
From: Peter C. <kr...@us...> - 2004-06-19 14:39:10
|
Update of /cvsroot/phpslash/phpslash-dev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14915 Modified Files: CHANGES Log Message: Bugfix: Search module was not picking up search parameters from _GET Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/CHANGES,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** CHANGES 27 Apr 2004 15:16:18 -0000 1.71 --- CHANGES 19 Jun 2004 14:39:00 -0000 1.72 *************** *** 13,16 **** --- 13,20 ---- 9 - Removal of something (kill -9 :) + 2004 June 18 Peter Cruickshank <kr...@us...> + [B] - search/index.php - Fixed bug where search module was not picking up + search parameters from _GET + 2004-April 27 10:00AM CST Joe Stewart <joe...@us...> [B] - Makefile - removed .cvsignore files from release - Closes Bug [ 942709 ]. |
From: Peter C. <kr...@us...> - 2004-06-19 14:33:33
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/search In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10364 Modified Files: index.php Log Message: Bugfix: Search module was not picking up search parameters from _GET Index: index.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/search/index.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** index.php 17 Apr 2003 23:31:00 -0000 1.2 --- index.php 19 Jun 2004 14:33:24 -0000 1.3 *************** *** 5,11 **** // TODO: search.php needs to have it's logic ripped out and put into an object ! global $_PSL; ! ! $ary = $GLOBALS['ary']; $pagetitle = pslgetText("Search"); --- 5,9 ---- // TODO: search.php needs to have it's logic ripped out and put into an object ! global $_PSL; $pagetitle = pslgetText("Search"); *************** *** 14,18 **** $maxsearchresults = $_PSL['search_maxresults']; ! if ($HTTP_GET_VARS['use_comments'] == 'on' && $_PSL['allow_comment_search']) { $search_comments = TRUE; } else { --- 12,16 ---- $maxsearchresults = $_PSL['search_maxresults']; ! if ($_GET['use_comments'] == 'on' && $_PSL['allow_comment_search']) { $search_comments = TRUE; } else { *************** *** 127,133 **** } ! $ary = array(); ! if(!empty($HTTP_GET_VARS)) { ! $ary = clean($HTTP_GET_VARS); } --- 125,131 ---- } ! #$ary = array(); ! if(!empty($_GET)) { ! $ary = clean($_GET); } *************** *** 144,148 **** $db = pslNew("slashDB"); ! $db->debug = false; $query = $ary['query']; --- 142,147 ---- $db = pslNew("slashDB"); ! //$db->Debug = true; ! $query = $ary['query']; *************** *** 189,193 **** topic_name FROM psl_topic, psl_topic_lut ! WHERE psl_topic.topic_id = psl_topic_lut.topic_id ORDER BY topic_name"); --- 188,192 ---- topic_name FROM psl_topic, psl_topic_lut ! WHERE psl_topic.topic_id = psl_topic_lut.topic_id ORDER BY topic_name"); *************** *** 375,379 **** $q .= "\n ORDER BY story.date_available DESC LIMIT $ary[min],$maxsearchresults"; ! // echo "<FONT SIZE=2><PRE>$q</PRE></FONT><BR>\n"; $db->query ($q); --- 374,378 ---- $q .= "\n ORDER BY story.date_available DESC LIMIT $ary[min],$maxsearchresults"; ! #echo "<FONT SIZE=2><PRE>$q</PRE></FONT><BR>\n"; $db->query ($q); |
From: Luis M <le...@us...> - 2004-06-11 14:11:15
|
Update of /cvsroot/phpslash/phpslash-dev/include/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10376/include/class Added Files: slashAuthLDAP.class Log Message: first commit --- NEW FILE: slashAuthLDAP.class --- <?php /* $Id: slashAuthLDAP.class,v 1.1 2004/06/11 14:10:59 lems1 Exp $ * * Mostly taken from Back-End LDAP.class which was: * Written by Peter Starowicz <pe...@op...> for OpenConcept.ca * * This module unfinished and untested - remove this when completed * */ class slashAuth extends slashAuth_base { // LDAP validation function psl_validate($username, $password, $user_info) { global $challenge; $is_user = false; $md5_pw = $this->ldap_pass($username); // generate the expected response $expected_response = md5("$md5_pw:$challenge"); // True when JS is disabled if ($response == "") { $md5_pw_net = md5("$username:$password"); $response = md5("$md5_pw_net:$challenge"); } if ($expected_response != $response) { // failed - return with error message $this->auth["error"] = pslgetText("Either your username or password are invalid. Please try again."); $is_user = false; } else { // success $is_user = true; } return $is_user; } /** * * Find and return the MD5 encoded password for the specified user * * **/ function ldap_pass($username = "") { // debug('function LDAP_pass()', ""); $ldap_user = $this->ldap_search_user($username); if ($ldap_user) { $md5_pw = md5($username .":". $ldap_user[0]["password"][0]; // return $ldap_user[0]["password"][0]; } //debug('function ldap_pass() ', 'failed'); return false; } /** * * Find and return the specified LDAP user * * **/ function ldap_search_user($username = "") { //debug('function LDAP_search_user()', ""); $this->ds = @ldap_connect($this->Host, $this->Port); $ldap_search_result = @ldap_search($this->ds, $this->Base_dn, $this->Search_detail."=".$username); if ($ldap_search_result) { //debug("function LDAP_search() ldap_search_result",print_r($ldap_search_result)); $result = ldap_get_entries($this->ds, $ldap_search_result); //debug("function LDAP_search() result",print_r($result)); return $result; } //debug('function LDAP_search_user() ', ' failed'); return false; } } ?> |
From: Joe S. <joe...@us...> - 2004-04-27 15:19:36
|
Update of /cvsroot/phpslash/phpslash-ft In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22723/phpslash-ft Modified Files: CHANGES Makefile Log Message: Makefile - removed .cvsignore files from release - Closes Bug [ 942709 ]. Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.776 retrieving revision 1.777 diff -C2 -d -r1.776 -r1.777 *** CHANGES 17 Nov 2003 14:47:40 -0000 1.776 --- CHANGES 27 Apr 2004 15:19:15 -0000 1.777 *************** *** 13,16 **** --- 13,19 ---- 9 - Removal of something (kill -9 :) + 2004-April 27 10:00AM CST Joe Stewart <joe...@us...> + [B] - Makefile - removed .cvsignore files from release - Closes Bug [ 942709 ]. + 2003-November 17 9:00AM CST Joe Stewart <joe...@us...> [F] - de_DE.LC_TIME.php3, de.php3 - contributed by alba. *************** *** 44,53 **** 2003-May 14 1:00PM CDT Joe Stewart <joe...@us...> [R] - Released phpSlash 0.7.2. ! - VERSION, config-dist.php3, about.tpl - bumped version for release. 2003-May-7 2:30PM CDT Joe Stewart <joe...@us...> [R] - Released phpSlash 0.7.2RC1. ! - VERSION, config-dist.php3 - bumped version for release. 2003-May-7 2:00PM CDT Joe Stewart <joe...@us...> --- 47,56 ---- 2003-May 14 1:00PM CDT Joe Stewart <joe...@us...> [R] - Released phpSlash 0.7.2. ! - VERSION, config-dist.php, about.tpl - bumped version for release. 2003-May-7 2:30PM CDT Joe Stewart <joe...@us...> [R] - Released phpSlash 0.7.2RC1. ! - VERSION, config-dist.php - bumped version for release. 2003-May-7 2:00PM CDT Joe Stewart <joe...@us...> *************** *** 55,59 **** the ini or config file. Story_admin.class - listStory alternates row color. ! cronmail.php3 - correct error reporting line. 2003-May-6 3:30PM CDT Joe Stewart <joe...@us...> --- 58,62 ---- the ini or config file. Story_admin.class - listStory alternates row color. ! cronmail.php - correct error reporting line. 2003-May-6 3:30PM CDT Joe Stewart <joe...@us...> *************** *** 64,76 **** 2003-May-2 1:30PM CDT Joe Stewart <joe...@us...> ! [B] - article.php3 - show and process email form correctly. 2003-April-28 10:00AM CDT Joe Stewart <joe...@us...> [BT] - Story.class, Story_base.class - "also text" fix, reduce warnings. ! comment.php3, emailNotifyComment.tpl, emailNotifySubmission.tpl - tweak url in notification email. 2003-April-25 1:30PM CDT Joe Stewart <joe...@us...> ! [B] - profile.php3 - ensure that options are predefined. 65_to_7.sql - add missing new submission permission for public. --- 67,79 ---- 2003-May-2 1:30PM CDT Joe Stewart <joe...@us...> ! [B] - article.php - show and process email form correctly. 2003-April-28 10:00AM CDT Joe Stewart <joe...@us...> [BT] - Story.class, Story_base.class - "also text" fix, reduce warnings. ! comment.php, emailNotifyComment.tpl, emailNotifySubmission.tpl - tweak url in notification email. 2003-April-25 1:30PM CDT Joe Stewart <joe...@us...> ! [B] - profile.php - ensure that options are predefined. 65_to_7.sql - add missing new submission permission for public. *************** *** 100,104 **** Section.class, optionTypes.tpl, authorNew.tpl, authorProfile.tpl, blockEdit.tpl, sectionNew.tpl, storyNew.tpl, phpslash.sgml, and ! config-dist.php3 - displayOptions rewritten to be able to display different option types. Option type supported are: text, radio, and select. --- 103,107 ---- Section.class, optionTypes.tpl, authorNew.tpl, authorProfile.tpl, blockEdit.tpl, sectionNew.tpl, storyNew.tpl, phpslash.sgml, and ! config-dist.php - displayOptions rewritten to be able to display different option types. Option type supported are: text, radio, and select. *************** *** 107,126 **** [BT] - Story_base.class - extractStories accepts order argument correctly. Story_admin.class, storyList.tpl - story_id in list story. ! storyAdmin.php3 - reduce php warnings. 2003-April 10 1:30PM CDT Joe Stewart <joe...@us...> [F] - slashTemplate.class - new method is_available. Check a template for a placeholder's existence. ! index.php3 - support header and footer in index templates. 2003-April 10 10:00AM CDT Joe Stewart <joe...@us...> ! [B] - slashAuthCR.class, login.php3, loginblock.tpl - cleanup of challenge generation and validation. 2003-April 9 3:00PM CDT Joe Stewart <joe...@us...> ! [W] - search.php3, Comment.class - reduce php warnings. 2003-April 9 2:00PM CDT Joe Stewart <joe...@us...> ! [W] - Block.class, Block_admin.class, blockAdmin.php3 - reduce php warnings. 2003-April 9 1:30PM CDT Joe Stewart <joe...@us...> --- 110,129 ---- [BT] - Story_base.class - extractStories accepts order argument correctly. Story_admin.class, storyList.tpl - story_id in list story. ! storyAdmin.php - reduce php warnings. 2003-April 10 1:30PM CDT Joe Stewart <joe...@us...> [F] - slashTemplate.class - new method is_available. Check a template for a placeholder's existence. ! index.php - support header and footer in index templates. 2003-April 10 10:00AM CDT Joe Stewart <joe...@us...> ! [B] - slashAuthCR.class, login.php, loginblock.tpl - cleanup of challenge generation and validation. 2003-April 9 3:00PM CDT Joe Stewart <joe...@us...> ! [W] - search.php, Comment.class - reduce php warnings. 2003-April 9 2:00PM CDT Joe Stewart <joe...@us...> ! [W] - Block.class, Block_admin.class, blockAdmin.php - reduce php warnings. 2003-April 9 1:30PM CDT Joe Stewart <joe...@us...> *************** *** 142,147 **** 2003-April 9 9:00AM CDT Joe Stewart <joe...@us...> ! [W] - config-dist.php3, lib.resources.php, tz.class, functions.inc, ! Story.class, slashAuthCR.class, profile.php3 - reduce php warnings. 2003-April 4 12:00PM CST Joe Stewart <joe...@us...> --- 145,150 ---- 2003-April 9 9:00AM CDT Joe Stewart <joe...@us...> ! [W] - config-dist.php, lib.resources.php, tz.class, functions.inc, ! Story.class, slashAuthCR.class, profile.php - reduce php warnings. 2003-April 4 12:00PM CST Joe Stewart <joe...@us...> Index: Makefile =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile 23 Nov 2001 16:29:23 -0000 1.3 --- Makefile 27 Apr 2004 15:19:27 -0000 1.4 *************** *** 38,41 **** --- 38,42 ---- rm .filelist find ${DISTDIR} -name CVS -type d | xargs rm -rf + find ${DISTDIR} -name .cvsignore | xargs rm -rf ${MAKE} -C ${DISTDIR}/doc/html all tar cvf ${BSF}.tar ${DISTDIR} > /dev/null |
From: Joe S. <joe...@us...> - 2004-04-27 15:16:26
|
Update of /cvsroot/phpslash/phpslash-dev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22093/phpslash-dev Modified Files: CHANGES Log Message: Makefile - removed .cvsignore files from release - Closes Bug [ 942709 ]. Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/CHANGES,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** CHANGES 23 Apr 2004 17:59:04 -0000 1.70 --- CHANGES 27 Apr 2004 15:16:18 -0000 1.71 *************** *** 13,16 **** --- 13,19 ---- 9 - Removal of something (kill -9 :) + 2004-April 27 10:00AM CST Joe Stewart <joe...@us...> + [B] - Makefile - removed .cvsignore files from release - Closes Bug [ 942709 ]. + 2004-April 22 3:00PM CST Joe Stewart <joe...@us...> [B] - slashAuth.class - missed $response argument in two places. |
From: Jeff B. <jb...@us...> - 2004-04-27 01:24:30
|
Update of /cvsroot/phpslash/debian In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2775 Added Files: README.Debian Log Message: Initial import of the readme file need to flesh out the quick install part... --- NEW FILE: README.Debian --- phpSlash Debian README * Installation instructions available at http://www.sf.net/projects/phpslash /usr/share/phpslash/class -- phpslash backend files /usr/share/phpslash/class/phplib -- Contains a phplib installation /var/www/phpslash/ -- Web documents * Quick install guide http://sourceforge.net/docman/display_doc.php?docid=1611&group_id=10566 - Create a database - Create a user - Create the tables - cp config-dist.ini.php to config.ini.php and edit config.ini.php - Set magic_quotes_gpc to off |
From: Jeff B. <jb...@us...> - 2004-04-27 00:03:10
|
Update of /cvsroot/phpslash/debian In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21097 Modified Files: rules Log Message: lintian warnings Index: rules =================================================================== RCS file: /cvsroot/phpslash/debian/rules,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** rules 13 Apr 2004 21:09:49 -0000 1.1 --- rules 27 Apr 2004 00:03:01 -0000 1.2 *************** *** 21,28 **** dh_clean -k dh_installdirs ! mkdir -p debian/tmp/var/www debian/tmp/usr/share/phpslash cp -R public_html debian/tmp/var/www/phpslash cp -R class debian/tmp/usr/share/phpslash/class cp -R tables debian/tmp/usr/share/phpslash/tables binary-indep: build install --- 21,44 ---- dh_clean -k dh_installdirs ! mkdir -p debian/tmp/var/www debian/tmp/usr/share/phpslash debian/tmp/usr/share/doc/phpslash cp -R public_html debian/tmp/var/www/phpslash cp -R class debian/tmp/usr/share/phpslash/class cp -R tables debian/tmp/usr/share/phpslash/tables + rm debian/tmp/usr/share/phpslash/class/jpcache/LICENSE + rm debian/tmp/usr/share/phpslash/class/phplib/COPYING + rm -f debian/tmp/usr/share/phpslash/class/phplib/doc/.cvsignore + rm -f debian/tmp/usr/share/phpslash/class/phplib/doc/sgml/.cvsignore + chmod 644 debian/tmp/var/www/phpslash/templates/en/default/article-pf.tpl + chmod 644 debian/tmp/var/www/phpslash/templates/en/default/backendTxt.tpl + chmod 644 debian/tmp/var/www/phpslash/images/leftbar.gif + chmod 644 debian/tmp/var/www/phpslash/images/topics/topicslashdot.gif + chmod 644 debian/tmp/var/www/phpslash/templates/en/basic/article-pf.tpl + chmod 644 debian/tmp/var/www/phpslash/images/dot.gif + chmod 644 debian/tmp/var/www/phpslash/images/slashdot.gif + chmod 644 debian/tmp/var/www/phpslash/md5.js + chmod 644 debian/tmp/var/www/phpslash/images/rightbar.gif + chmod 644 debian/tmp/var/www/phpslash/images/mainbar.gif + chmod 644 debian/tmp/usr/share/phpslash/class/Block_render_skin.class + chmod 644 debian/tmp/var/www/phpslash/templates/en/basic/backendTxt.tpl binary-indep: build install |
From: Jeff B. <jb...@us...> - 2004-04-24 02:06:40
|
Update of /cvsroot/phpslash/debian In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32691 Removed Files: postinst templates Log Message: I'm going to nix these and let the user do the work (at least for initial packages). --- postinst DELETED --- --- templates DELETED --- |
From: Joe S. <joe...@us...> - 2004-04-23 17:59:13
|
Update of /cvsroot/phpslash/phpslash-dev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv369/phpslash-dev Modified Files: CHANGES Log Message: slashAuth.class - missed argument in two places. Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/CHANGES,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** CHANGES 22 Apr 2004 20:12:01 -0000 1.69 --- CHANGES 23 Apr 2004 17:59:04 -0000 1.70 *************** *** 14,17 **** --- 14,20 ---- 2004-April 22 3:00PM CST Joe Stewart <joe...@us...> + [B] - slashAuth.class - missed $response argument in two places. + + 2004-April 22 3:00PM CST Joe Stewart <joe...@us...> [T] - loginformCR.tpl - Luis says "javascript error on login form fix". |
From: Joe S. <joe...@us...> - 2004-04-23 17:58:52
|
Update of /cvsroot/phpslash/phpslash-dev/include/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32713/phpslash-dev/include/class Modified Files: slashAuth.class Log Message: slashAuth.class - missed argument in two places. Index: slashAuth.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/class/slashAuth.class,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** slashAuth.class 22 Apr 2004 20:08:17 -0000 1.3 --- slashAuth.class 23 Apr 2004 17:58:40 -0000 1.4 *************** *** 521,525 **** // the user in. $md5_pw = md5($username .":". $pass1); ! if($this->psl_validate($username, $md5_pw, $user_info)) { // if ($user_info["password"] == $md5_pw) { $uid = $user_info["author_id"]; --- 521,525 ---- // the user in. $md5_pw = md5($username .":". $pass1); ! if($this->psl_validate($username, $md5_pw, '', $user_info)) { // if ($user_info["password"] == $md5_pw) { $uid = $user_info["author_id"]; *************** *** 777,781 **** // dummy method to be overridden in child class ! function psl_validate($username, $password, $user_info) { return false; } --- 777,781 ---- // dummy method to be overridden in child class ! function psl_validate($username, $password, $response, $user_info) { return false; } |
From: Joe S. <joe...@us...> - 2004-04-22 20:12:10
|
Update of /cvsroot/phpslash/phpslash-dev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14971/phpslash-dev Modified Files: CHANGES Log Message: javascript error on login form fix Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/CHANGES,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** CHANGES 22 Apr 2004 20:08:16 -0000 1.68 --- CHANGES 22 Apr 2004 20:12:01 -0000 1.69 *************** *** 14,17 **** --- 14,20 ---- 2004-April 22 3:00PM CST Joe Stewart <joe...@us...> + [T] - loginformCR.tpl - Luis says "javascript error on login form fix". + + 2004-April 22 3:00PM CST Joe Stewart <joe...@us...> [B] - slashAuth.class, slashAuthCR.class - psl_validate was depending on global variable $response. |
From: Joe S. <joe...@us...> - 2004-04-22 20:11:29
|
Update of /cvsroot/phpslash/phpslash-dev/include/templates/en/basic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14696/phpslash-dev/include/templates/en/basic Modified Files: loginformCR.tpl Log Message: javascript error on login form fix Index: loginformCR.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/templates/en/basic/loginformCR.tpl,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** loginformCR.tpl 12 Mar 2003 16:12:52 -0000 1.1.1.1 --- loginformCR.tpl 22 Apr 2004 20:11:21 -0000 1.2 *************** *** 57,60 **** --- 57,61 ---- <input type="hidden" name="challenge" value="{CHALLENGE}"> <input type="hidden" name="response" value=""> + <input type="hidden" name="setcookie" value=""> </form> <script language="JavaScript"> |