Ticket #545: jTpl.classe.diff
| File jTpl.classe.diff, 1.2 kB (added by Lipki, 7 months ago) |
|---|
-
jTpl.class.php
old new 97 97 $fct = $fctname.md5($sel->module.'_'.$sel->resource.'_'.$sel->outputType.($trusted?'_t':'')); 98 98 $fct($this); 99 99 } 100 public function fetch($tpl, $outputtype='', $trusted = true, $callMeta=true ){100 public function fetch($tpl, $outputtype='', $trusted = true, $callMeta=true, $dyn=false){ 101 101 $content = ''; 102 102 ob_start(); 103 103 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); 106 108 $md = md5($sel->module.'_'.$sel->resource.'_'.$sel->outputType.($trusted?'_t':'')); 107 109 if($callMeta){ 108 110 $fct = 'template_meta_'.$md; … … 117 119 } 118 120 return $content; 119 121 } 122 public function dynFetch($tpl, $outputtype='', $trusted = true, $callMeta=true){ 123 return $this->fetch($tpl, $outputtype, $trusted, $callMeta, true); 124 } 120 125 public function metaFetch($tpl, $outputtype='', $trusted = true){ 121 126 return $this->fetch($tpl, $outputtype, $trusted,true); 122 127 }
