Update of /cvsroot/phpslash/phpslash-ft/class
In directory usw-pr-cvs1:/tmp/cvs-serv10283
Modified Files:
Block_i.class Block_render_quote.class
Block_render_topic.class Block_render_query.class
Block_render_section.class
Log Message:
Just cleaning out some globals.
Index: Block_i.class
===================================================================
RCS file: /cvsroot/phpslash/phpslash-ft/class/Block_i.class,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Block_i.class 2001/09/07 15:28:39 1.6
--- Block_i.class 2001/10/09 23:21:45 1.7
***************
*** 22,26 ****
/* Here starts Block_i specfic construction */
- // global $PHP_SELF,$rootdir,$basedir,$imagedir, $templatedir;
global $_PSL;
--- 22,25 ----
Index: Block_render_quote.class
===================================================================
RCS file: /cvsroot/phpslash/phpslash-ft/class/Block_render_quote.class,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Block_render_quote.class 2001/05/15 22:36:15 1.1
--- Block_render_quote.class 2001/10/09 23:21:45 1.2
***************
*** 1,20 ****
<?php
- global $rootdir, $basedir;
-
/* Block_render_quote.class -> Random quote generator */
/* Id:$ */
-
class Block_render_quote {
var $type;
var $output;
/* constructor */
function Block_render_quote() {
$this->type = "quote"; /* set the 'type' */
$this->output = ""; /* clear the output */
}
--- 1,21 ----
<?php
/* Block_render_quote.class -> Random quote generator */
/* Id:$ */
class Block_render_quote {
var $type;
var $output;
+ var $psl;
/* constructor */
function Block_render_quote() {
+ global $_PSL;
+
$this->type = "quote"; /* set the 'type' */
$this->output = ""; /* clear the output */
+ $this->psl = $_PSL;
}
***************
*** 33,38 ****
function query( $block_info) {
- global $rootdir, $basedir, $templatedir;
-
$default_tpl = "quoteblock.tpl";
--- 34,37 ----
***************
*** 45,49 ****
if( empty($ary[tpl]) ) {
$tpl = $default_tpl;
! } elseif ( file_exists($templatedir . "/" . basename($ary[tpl]) . ".tpl") ) {
# should be secure as path directives are discarded and extension added
$tpl = basename($ary[tpl]) . ".tpl";
--- 44,48 ----
if( empty($ary[tpl]) ) {
$tpl = $default_tpl;
! } elseif ( file_exists($this->[templatedir] . "/" . basename($ary[tpl]) . ".tpl") ) {
# should be secure as path directives are discarded and extension added
$tpl = basename($ary[tpl]) . ".tpl";
***************
*** 53,57 ****
}
! $template = new Template($templatedir);
$template->debug = 0;
$template->set_file(array(
--- 52,56 ----
}
! $template = new Template($this->[templatedir]);
$template->debug = 0;
$template->set_file(array(
Index: Block_render_topic.class
===================================================================
RCS file: /cvsroot/phpslash/phpslash-ft/class/Block_render_topic.class,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Block_render_topic.class 2001/09/06 17:18:22 1.3
--- Block_render_topic.class 2001/10/09 23:21:45 1.4
***************
*** 1,6 ****
<?php
- global $rootdir, $basedir, $templatedir;
-
/* Block_render_topic.class -> Methods for phpslash specfic blocks */
/* Id:$ */
--- 1,4 ----
***************
*** 18,23 ****
*/
-
-
class Block_render_topic {
--- 16,19 ----
***************
*** 50,55 ****
function topics( $block_info) {
- global $rootdir, $basedir, $templatedir;
-
$db = new slashDB;
--- 46,49 ----
***************
*** 59,72 ****
}
-
$options = $block_info["source_url"];
parse_str( $options);
-
// $tpl = ""; // disable template option
if( empty($tpl) ) {
$tpl = $default_tpl;
! } elseif ( file_exists($templatedir . "/" . basename($tpl) . ".tpl") ) {
$tpl = basename($tpl) . ".tpl";
} else {
--- 53,64 ----
}
$options = $block_info["source_url"];
parse_str( $options);
// $tpl = ""; // disable template option
if( empty($tpl) ) {
$tpl = $default_tpl;
! } elseif ( file_exists($this->psl[templatedir] . "/" . basename($tpl) . ".tpl") ) {
$tpl = basename($tpl) . ".tpl";
} else {
***************
*** 75,79 ****
}
! $template = new Template($templatedir);
$template->debug = 0;
$template->set_file(array(
--- 67,71 ----
}
! $template = new Template($this->psl[templatedir]);
$template->debug = 0;
$template->set_file(array(
***************
*** 145,150 ****
$template->set_var(array(
! ROOTDIR => $rootdir,
! IMAGEDIR => $imagedir
));
--- 137,142 ----
$template->set_var(array(
! ROOTDIR => $this->psl[rooturl],
! IMAGEDIR => $this->psl[imageurl]
));
Index: Block_render_query.class
===================================================================
RCS file: /cvsroot/phpslash/phpslash-ft/class/Block_render_query.class,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Block_render_query.class 2001/06/29 15:55:17 1.2
--- Block_render_query.class 2001/10/09 23:21:45 1.3
***************
*** 1,6 ****
<?php
- global $rootdir, $basedir;
-
/* Block_render_query.class -> Methods for phpslash specfic blocks */
/* Id:$ */
--- 1,4 ----
***************
*** 25,39 ****
*/
-
class Block_render_query {
var $type;
var $output;
/* constructor */
function Block_render_query() {
$this->type = "query"; /* set the 'type' */
$this->output = ""; /* clear the output */
}
--- 23,40 ----
*/
class Block_render_query {
var $type;
var $output;
+ var $psl;
/* constructor */
function Block_render_query() {
+ global $_PSL;
+
$this->type = "query"; /* set the 'type' */
$this->output = ""; /* clear the output */
+ $this->psl = $_PSL;
}
***************
*** 52,57 ****
function query( $block_info) {
- global $rootdir, $basedir, $templatedir;
-
$stories = new Story;
--- 53,56 ----
***************
*** 67,71 ****
if( empty($ary[tpl]) ) {
$tpl = $default_tpl;
! } elseif ( file_exists($templatedir . "/" . basename($ary[tpl]) . ".tpl") ) {
# should be secure as path directives are discarded and extension added
$tpl = basename($ary[tpl]) . ".tpl";
--- 66,70 ----
if( empty($ary[tpl]) ) {
$tpl = $default_tpl;
! } elseif ( file_exists($this->psl[templatedir] . "/" . basename($ary[tpl]) . ".tpl") ) {
# should be secure as path directives are discarded and extension added
$tpl = basename($ary[tpl]) . ".tpl";
***************
*** 75,79 ****
}
! $template = new Template($templatedir);
$template->debug = 0;
$template->set_file(array(
--- 74,78 ----
}
! $template = new Template($this->psl["templatedir"]);
$template->debug = 0;
$template->set_file(array(
***************
*** 111,119 ****
$template->set_var(array(
! ROOTDIR => $rootdir,
! IMAGEDIR => $imagedir
));
! return $template->parse(OUT,"block");
}
--- 110,118 ----
$template->set_var(array(
! ROOTDIR => $this->psl[rooturl],
! IMAGEDIR => $this->psl[imageurl]
));
! 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.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Block_render_section.class 2001/09/06 17:18:22 1.3
--- Block_render_section.class 2001/10/09 23:21:45 1.4
***************
*** 1,6 ****
<?php
- global $rootdir, $basedir, $templatedir;
-
/* Block_render_section.class -> Methods for phpslash specfic blocks */
/* Id:$ */
--- 1,4 ----
***************
*** 46,51 ****
function sections( $block_info) {
- global $rootdir, $basedir, $templatedir;
-
$db = new slashDB;
--- 44,47 ----
***************
*** 65,69 ****
if( empty($tpl) ) {
$tpl = $default_tpl;
! } elseif ( file_exists($templatedir . "/" . basename($tpl) . ".tpl") ) {
$tpl = basename($tpl) . ".tpl";
} else {
--- 61,65 ----
if( empty($tpl) ) {
$tpl = $default_tpl;
! } elseif ( file_exists($this->psl[templatedir] . "/" . basename($tpl) . ".tpl") ) {
$tpl = basename($tpl) . ".tpl";
} else {
***************
*** 72,76 ****
}
! $template = new Template($templatedir);
$template->debug = 0;
$template->set_file(array(
--- 68,72 ----
}
! $template = new Template($this->psl[templatedir]);
$template->debug = 0;
$template->set_file(array(
***************
*** 112,117 ****
$template->set_var(array(
! ROOTDIR => $rootdir,
! IMAGEDIR => $imagedir
));
--- 108,113 ----
$template->set_var(array(
! ROOTDIR => $this->psl[rooturl],
! IMAGEDIR => $this->psl[imageurl]
));
|