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

Commit

Permalink
refs #71 Add .tpl override
Browse files Browse the repository at this point in the history
  • Loading branch information
nabeelio committed Jul 16, 2012
1 parent 51abef3 commit 520b976
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions core/classes/TemplateSet.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,13 @@ public function get($tpl_name, $ret = false, $checkskin = true, $force_base = fa
*
*/
public function getTemplate($tpl_name, $ret = false, $checkskin = true, $force_base = false) {

if(substr_count($tpl_name, '.tpl') > 0) {
$tpl_name = str_replace('.tpl', '.' . $this->tpl_ext, $tpl_name);
}

if (strstr($tpl_name, $this->tpl_ext) === false) {
$tpl_name .= '.'.$this->tpl_ext;
if (substr_count($tpl_name, '.' . $this->tpl_ext) === 0) {
$tpl_name .= '.' . $this->tpl_ext;
}

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

0 comments on commit 520b976

Please sign in to comment.