Changeset 5126 for trunk/include/template.class.php
- Timestamp:
- Mar 13, 2010, 3:14:32 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/template.class.php
r5123 r5126 79 79 80 80 $this->smarty->template_dir = array(); 81 if ( !empty($theme) ) 82 { 83 $this->set_theme($root, $theme, $path); 84 } 81 $this->set_theme($root, $theme, $path); 85 82 86 83 $this->smarty->assign('lang_info', $lang_info); … … 89 86 { 90 87 $tpl_extents = unserialize($conf['extents_for_templates']); 91 $this->set_extents($tpl_extents, './template-extension/', true );88 $this->set_extents($tpl_extents, './template-extension/', true, $theme); 92 89 } 93 90 } … … 116 113 } 117 114 115 /** 116 * Add template directory for this Template object. 117 * Set compile id if not exists. 118 */ 118 119 function set_template_dir($dir) 119 120 { … … 190 191 * Sets template extention filename for handles. 191 192 */ 192 function set_extent($filename, $param, $dir='', $overwrite=true )193 function set_extent($filename, $param, $dir='', $overwrite=true, $theme='N/A') 193 194 { 194 195 return $this->set_extents(array($filename => $param), $dir, $overwrite); … … 199 200 * $filename_array should be an hash of filename => array( handle, param) or filename => handle 200 201 */ 201 function set_extents($filename_array, $dir='', $overwrite=true) 202 { 203 global $user; 204 202 function set_extents($filename_array, $dir='', $overwrite=true, $theme='N/A') 203 { 205 204 if (!is_array($filename_array)) 206 205 { … … 213 212 $handle = $value[0]; 214 213 $param = $value[1]; 215 $t pl= $value[2];214 $thm = $value[2]; 216 215 } 217 216 elseif (is_string($value)) … … 219 218 $handle = $value; 220 219 $param = 'N/A'; 221 $t pl= 'N/A';220 $thm = 'N/A'; 222 221 } 223 222 else … … 227 226 228 227 if ((stripos(implode('',array_keys($_GET)), '/'.$param) !== false or $param == 'N/A') 229 and ($t pl == $user['theme'] or $tpl == 'N/A')228 and ($thm == $theme) 230 229 and (!isset($this->extents[$handle]) or $overwrite) 231 230 and file_exists($dir . $filename))
Note: See TracChangeset
for help on using the changeset viewer.