Update flight/template/View.php

using basename instead of testing with strpos.
pull/21/head
kafene 12 years ago
parent c6fdc21bd8
commit fa020e39d0

@ -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';
}
/**

Loading…
Cancel
Save