--- FreeBSD/tinderbox/webui/module/module.php 2007/11/02 20:55:00 1.1 +++ FreeBSD/tinderbox/webui/module/module.php 2007/11/13 07:36:19 1.1.1.1.2.1 @@ -24,19 +24,18 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # +# $Paefchen$ # $MCom: portstools/tinderbox/webui/module/module.php,v 1.4 2005/12/26 22:41:41 marcus Exp $ # -require_once 'core/functions.php'; -require_once 'core/TinderboxDS.php'; - class module { + public $TinderboxDS = null; - function module() { - $this->TinderboxDS = new TinderboxDS(); + public function __construct() { + $this->TinderboxDS = new TinderboxDS; } - function template_parse( $template ) { + public function template_parse( $template ) { global $templatesdir; global $templatesuri; global $tinderbox_name; @@ -51,7 +50,7 @@ class module { foreach( $this->TEMPLATE_VARS as $varname => $varcontent ) { $varcontent = var_export( $varcontent, true ); - eval( '$'.$varname.' = '.$varcontent.';' ); + $$varname = $varcontent; } ob_start(); require $templatesdir.'/'.$template; @@ -63,12 +62,13 @@ class module { return $parsed; } - function template_assign( $varname, $varcontent ) { + public function template_assign( $varname, $varcontent ) { $this->TEMPLATE_VARS[$varname] = $varcontent; } - function template_cleanup() { + public function template_cleanup() { return $this->TEMPLATE_VARS = array(); } } + ?>