Update of /cvsroot/phpslash/phpslash-ft/class
In directory usw-pr-cvs1:/tmp/cvs-serv3745/class
Modified Files:
functions.inc Block_render_section.class
Log Message:
bugfix - no browser lang
Index: functions.inc
===================================================================
RCS file: /cvsroot/phpslash/phpslash-ft/class/functions.inc,v
retrieving revision 1.80
retrieving revision 1.81
diff -C2 -d -r1.80 -r1.81
*** functions.inc 2001/11/14 18:06:30 1.80
--- functions.inc 2001/11/17 17:17:03 1.81
***************
*** 922,925 ****
--- 922,928 ----
}
+ } else {
+ // no browser pref
+ $templatedir .= "/" . basename($_PSL['language']);
}
***************
*** 965,970 ****
$templatedir = $_PSL[templatedir];
if( $new_skin == "..") {
! $new_skin = "default";
}
if($new_skin) {
--- 968,974 ----
$templatedir = $_PSL[templatedir];
+ // no directory traversal
if( $new_skin == "..") {
! $new_skin = $_PSL[defaultskin;
}
if($new_skin) {
Index: Block_render_section.class
===================================================================
RCS file: /cvsroot/phpslash/phpslash-ft/class/Block_render_section.class,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Block_render_section.class 2001/10/09 23:21:45 1.4
--- Block_render_section.class 2001/11/17 17:17:03 1.5
***************
*** 11,14 ****
--- 11,16 ----
*
* 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)
*/
***************
*** 81,85 ****
$q = "SELECT DISTINCT psl_section.section_id,
! psl_section.section_name
FROM psl_section ";
/* "all" will show sections that don't have any stories */
--- 83,88 ----
$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 */
***************
*** 87,91 ****
--- 90,101 ----
$q .= ", psl_section_lut
WHERE psl_section.section_id = psl_section_lut.section_id ";
+ if ( $section_id) {
+ $q .= " AND psl_section.section_id = '$section_id' ";
+ } elseif( $section) {
+ $q .= " AND psl_section.section_name = '$section' ";
+ }
+
}
+
$q .= " ORDER BY section_name";
***************
*** 102,106 ****
$template->set_var (array (
SECTION_LINK => $section_link,
! SECTION_NAME => $db->Record[section_name]
));
$template->parse ("section_block", "each_section", true);
--- 112,117 ----
$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);
|