Skip to content
This repository was archived by the owner on Dec 6, 2019. It is now read-only.

Commit 520b976

Browse files
committed
refs #71 Add .tpl override
1 parent 51abef3 commit 520b976

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: core/classes/TemplateSet.class.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,13 @@ public function get($tpl_name, $ret = false, $checkskin = true, $force_base = fa
209209
*
210210
*/
211211
public function getTemplate($tpl_name, $ret = false, $checkskin = true, $force_base = false) {
212+
213+
if(substr_count($tpl_name, '.tpl') > 0) {
214+
$tpl_name = str_replace('.tpl', '.' . $this->tpl_ext, $tpl_name);
215+
}
212216

213-
if (strstr($tpl_name, $this->tpl_ext) === false) {
214-
$tpl_name .= '.'.$this->tpl_ext;
217+
if (substr_count($tpl_name, '.' . $this->tpl_ext) === 0) {
218+
$tpl_name .= '.' . $this->tpl_ext;
215219
}
216220

217221
/* See if the file has been over-rided in the skin directory

0 commit comments

Comments
 (0)