Update of /cvsroot/phpslash/phpslash-ft/class
In directory usw-pr-cvs1:/tmp/cvs-serv1144/class
Modified Files:
Block_render_query.class Block_render_section.class
Block_render_topic.class Story_base.class functions.inc
Log Message:
Fixing unqouted strings
Index: Block_render_query.class
===================================================================
RCS file: /cvsroot/phpslash/phpslash-ft/class/Block_render_query.class,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Block_render_query.class 5 Mar 2002 16:48:28 -0000 1.6
--- Block_render_query.class 27 Apr 2002 20:31:10 -0000 1.7
***************
*** 34,39 ****
global $_PSL;
! $this->type = "query"; /* set the 'type' */
! $this->output = ""; /* clear the output */
$this->psl = $_PSL;
--- 34,39 ----
global $_PSL;
! $this->type = 'query'; /* set the 'type' */
! $this->output = ''; /* clear the output */
$this->psl = $_PSL;
***************
*** 58,70 ****
$site_homesection = $this->psl['site_homesection'];
! $default_tpl = "queryblock.tpl";
! $options_ary = split( "&",$block_info["source_url"] );
for( $i=0 ; $i < count($options_ary) ; $i++) {
! $arg_ary = split( "=", $options_ary[$i]);
$ary[$arg_ary[0]] = urldecode($arg_ary[1]);
}
! $ary[tpl] = ""; // disable template option
if( empty($ary['tpl']) ) {
$tpl = $default_tpl;
--- 58,70 ----
$site_homesection = $this->psl['site_homesection'];
! $default_tpl = 'queryblock.tpl';
! $options_ary = split( '&',$block_info['source_url'] );
for( $i=0 ; $i < count($options_ary) ; $i++) {
! $arg_ary = split( '=', $options_ary[$i]);
$ary[$arg_ary[0]] = urldecode($arg_ary[1]);
}
! $ary['tpl'] = ''; // disable template option
if( empty($ary['tpl']) ) {
$tpl = $default_tpl;
***************
*** 77,86 ****
}
! $template = new Template($this->psl["templatedir"]);
$template->debug = 0;
$template->set_file(array(
! block => "$tpl"
));
! $template->set_block ("block", "each_query", "query_block");
$stories_ary = $stories->extractStories( $ary);
--- 77,86 ----
}
! $template = new Template($this->psl['templatedir']);
$template->debug = 0;
$template->set_file(array(
! 'block' => $tpl
));
! $template->set_block ('block', 'each_query', 'query_block');
$stories_ary = $stories->extractStories( $ary);
***************
*** 89,106 ****
for ($i = 0 ; $i < count($stories_ary) ; $i++) {
! $story_id = $stories_ary[$i][story_id];
! if ($ary['section_id'] != "") {
! $story_id .= $amp . "section_id=" . $ary['section_id'];
} elseif ( ($ary['section'] != "") AND ( $ary['section'] != $site_homesection)) {
$section = new Section;
$section_name = $section->getId($ary['section']);
! $story_id .= $amp . "section=" . $section_name;
}
! if ($topic_id != "") {
! $story_id .= $amp . "topic_id=" . $ary['topic_id'];
! } elseif ($ary['topic'] != "") {
$topic = new Topic;
$topic_name = $topic->getId($ary['topic']);
! $story_id .= $amp . "topic=" . $topic_name;
}
--- 89,106 ----
for ($i = 0 ; $i < count($stories_ary) ; $i++) {
! $story_id = $stories_ary[$i]['story_id'];
! if ($ary['section_id'] != '') {
! $story_id .= $amp . 'section_id=' . $ary['section_id'];
} elseif ( ($ary['section'] != "") AND ( $ary['section'] != $site_homesection)) {
$section = new Section;
$section_name = $section->getId($ary['section']);
! $story_id .= $amp . 'section=' . $section_name;
}
! if ($topic_id != '') {
! $story_id .= $amp . 'topic_id=' . $ary['topic_id'];
! } elseif ($ary['topic'] != '') {
$topic = new Topic;
$topic_name = $topic->getId($ary['topic']);
! $story_id .= $amp . 'topic=' . $topic_name;
}
***************
*** 123,127 ****
));
! $template->parse ("query_block", "each_query", true);
}
--- 123,127 ----
));
! $template->parse ('query_block', 'each_query', true);
}
***************
*** 133,137 ****
));
unset($stories);
! return $template->parse('OUT',"block");
}
--- 133,137 ----
));
unset($stories);
! return $template->parse('OUT','block');
}
Index: Block_render_section.class
===================================================================
RCS file: /cvsroot/phpslash/phpslash-ft/class/Block_render_section.class,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** Block_render_section.class 5 Mar 2002 16:50:57 -0000 1.8
--- Block_render_section.class 27 Apr 2002 20:31:10 -0000 1.9
***************
*** 73,77 ****
$template->debug = 0;
$template->set_file(array(
! block => "$tpl"
));
$template->set_block ("block", "each_section", "section_block");
--- 73,77 ----
$template->debug = 0;
$template->set_file(array(
! 'block' => "$tpl"
));
$template->set_block ("block", "each_section", "section_block");
Index: Block_render_topic.class
===================================================================
RCS file: /cvsroot/phpslash/phpslash-ft/class/Block_render_topic.class,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Block_render_topic.class 5 Mar 2002 16:50:57 -0000 1.7
--- Block_render_topic.class 27 Apr 2002 20:31:10 -0000 1.8
***************
*** 69,91 ****
}
! $template = new Template($this->psl[templatedir]);
$template->debug = 0;
$template->set_file(array(
! block => $tpl
));
! $template->set_block ("block", "each_topic", "topic_block");
$template->set_var (array (
! 'TOPIC_ID' => "",
! 'TOPCIC_NAME' => ""
));
! $q = "SELECT DISTINCT psl_topic.topic_id,
psl_topic.topic_name
! FROM psl_topic ";
/* "all" will list those topics without stories also */
if ( $mode != "all") {
/* "section" will show how only topics in this section that have stories */
! if ( $section_id != "") {
$q .= ",psl_topic_lut,
psl_section_lut,
--- 69,91 ----
}
! $template = new Template($this->psl['templatedir']);
$template->debug = 0;
$template->set_file(array(
! 'block' => $tpl
));
! $template->set_block ('block', 'each_topic', 'topic_block');
$template->set_var (array (
! 'TOPIC_ID' => '',
! 'TOPCIC_NAME' => ''
));
! $q = 'SELECT DISTINCT psl_topic.topic_id,
psl_topic.topic_name
! FROM psl_topic ';
/* "all" will list those topics without stories also */
if ( $mode != "all") {
/* "section" will show how only topics in this section that have stories */
! if ( $section_id != '') {
$q .= ",psl_topic_lut,
psl_section_lut,
***************
*** 144,148 ****
));
! $output = $template->parse('OUT',"block");
unset($db);
return $output;
--- 144,148 ----
));
! $output = $template->parse('OUT','block');
unset($db);
return $output;
Index: Story_base.class
===================================================================
RCS file: /cvsroot/phpslash/phpslash-ft/class/Story_base.class,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** Story_base.class 22 Apr 2002 14:56:09 -0000 1.11
--- Story_base.class 27 Apr 2002 20:31:10 -0000 1.12
***************
*** 34,37 ****
--- 34,39 ----
function Story_base () {
$this->db = new slashDB;
+ // NH: Umm.. do we mean the global $auth and $perm varables here?
+ // If so pass them by reference from $GLOBALS
$this->auth = $auth;
$this->perm = $perm;
Index: functions.inc
===================================================================
RCS file: /cvsroot/phpslash/phpslash-ft/class/functions.inc,v
retrieving revision 1.99
retrieving revision 1.100
diff -C2 -d -r1.99 -r1.100
*** functions.inc 10 Apr 2002 03:03:42 -0000 1.99
--- functions.inc 27 Apr 2002 20:31:10 -0000 1.100
***************
*** 841,845 ****
if( $pslstrings[$string]) {
$string = htmlentities($pslstrings[$string]);
! } elseif (($_PSL[debug]) AND ($pslstrings)) {
$string = message( $string, "messageStrike");
}
--- 841,845 ----
if( $pslstrings[$string]) {
$string = htmlentities($pslstrings[$string]);
! } elseif (($_PSL['debug']) AND ($pslstrings)) {
$string = message( $string, "messageStrike");
}
|