From fa020e39d0db9a1f81640a03e8ffd9ce710c033c Mon Sep 17 00:00:00 2001 From: kafene Date: Sun, 23 Dec 2012 02:45:14 -0500 Subject: [PATCH] Update flight/template/View.php using basename instead of testing with strpos. --- flight/template/View.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flight/template/View.php b/flight/template/View.php index 049c2ba..df10078 100644 --- a/flight/template/View.php +++ b/flight/template/View.php @@ -143,7 +143,7 @@ class View { * @return string Template file location */ public function getTemplate($file) { - return $this->path.'/'.((substr($file, -4) == '.php') ? $file : $file.'.php'); + return $this->path.'/'.basename($file, '.php').'.php'; } /**