From ecc0b87024d2a4d06b65023fa2d25b372212d895 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Thu, 10 Jan 2013 10:00:44 -0800 Subject: [PATCH] Updated getTemplate to allow subdirectories. --- flight/template/View.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flight/template/View.php b/flight/template/View.php index d3d83f9..1f44a64 100644 --- a/flight/template/View.php +++ b/flight/template/View.php @@ -146,7 +146,10 @@ class View { * @return string Template file location */ public function getTemplate($file) { - return $this->path.'/'.basename($file, '.php').'.php'; + if ((substr($file, -4) != '.php')) { + $file .= '.php'; + } + return $this->path.'/'.$file; } /**