pedro_morgan
2007-08-21 1d751b044e3e2a8c0ebd607425ef3605c00b1096
interface/lib/classes/tpl.inc.php
@@ -157,7 +157,9 @@
         */
        public function newTemplate($tmplfile)
        {
            if (!$tfile = $this->_fileSearch($tmplfile)) vlibTemplateError::raiseError('VT_ERROR_NOFILE',KILL,$tmplfile);
            if (!$tfile = $this->_fileSearch($tmplfile)){
                vlibTemplateError::raiseError('VT_ERROR_NOFILE', KILL, $tmplfile);
            }
            //* make sure that any parsing vars are cleared for the new template
            $this->_tmplfile = null;
@@ -169,8 +171,9 @@
            $this->_totalparsetime = null;
            //* reset debug module
            if ($this->_debug) $this->_debugReset();
            if ($this->_debug){
                $this->_debugReset();
            }
            $this->_tmplfilename = $tfile;
            return true;
        }
@@ -253,8 +256,7 @@
         */
        public function getVars()
        {
            if (empty($this->_vars)) return false;
            return $this->_vars;
            return empty($this->_vars) ? false : $this->_vars;
        }
        /**
@@ -265,8 +267,7 @@
        public function getVar($var)
        {
            if ($this->OPTIONS['CASELESS']) $var = strtolower($var);
            if (empty($var) || !isset($this->_vars[$var])) return false;
            return $this->_vars[$var];
            return (empty($var) || !isset($this->_vars[$var])) ? false : $this->_vars[$var];
        }
        /**
@@ -328,6 +329,7 @@
            }
            $loop_arr = array();
            // TODO: Are all these necessary as were onyl using mysql and possible postgres ? - pedro
            switch ($db_type) {
                case 'MYSQL':
@@ -795,7 +797,9 @@
            if ($this->_includedepth > $this->OPTIONS['MAX_INCLUDES'] || $tmplfile == false) {
                return;
            } else {
                if ($this->_debug) array_push ($this->_debugIncludedfiles, $tmplfile);
                if ($this->_debug){
                    array_push ($this->_debugIncludedfiles, $tmplfile);
                }
                if ($do_eval) {
                    array_push($this->_currentincludedir, dirname($tmplfile));
                    $this->_includedepth++;