Ticket #545: jTpl.classe.diff

File jTpl.classe.diff, 1.2 kB (added by Lipki, 7 months ago)
  • jTpl.class.php

    old new  
    9797                $fct = $fctname.md5($sel->module.'_'.$sel->resource.'_'.$sel->outputType.($trusted?'_t':'')); 
    9898                $fct($this); 
    9999        } 
    100         public function fetch($tpl, $outputtype='', $trusted = true, $callMeta=true){ 
     100        public function fetch($tpl, $outputtype='', $trusted = true, $callMeta=true, $dyn=false){ 
    101101                $content = ''; 
    102102                ob_start(); 
    103103                try{ 
    104                         $sel = new jSelectorTpl($tpl, $outputtype, $trusted); 
    105                         jIncluder::inc($sel); 
     104                        if( $dyn ) 
     105                                 $sel = new jSelectorVTpl($tpl, $outputtype, $trusted); 
     106                        else $sel = new jSelectorTpl($tpl, $outputtype, $trusted); 
     107            jIncluder::inc($sel); 
    106108                        $md = md5($sel->module.'_'.$sel->resource.'_'.$sel->outputType.($trusted?'_t':'')); 
    107109                        if($callMeta){ 
    108110                                $fct = 'template_meta_'.$md; 
     
    117119                } 
    118120                return $content; 
    119121        } 
     122    public function dynFetch($tpl, $outputtype='', $trusted = true, $callMeta=true){ 
     123        return $this->fetch($tpl, $outputtype, $trusted, $callMeta, true); 
     124    } 
    120125        public function metaFetch($tpl, $outputtype='', $trusted = true){ 
    121126                return $this->fetch($tpl, $outputtype, $trusted,true); 
    122127        } 
Download in other formats: Original Format