Merge pull request #21 from kafene/master

using basename instead of substr.
pull/22/merge
Mike Cao 12 years ago
commit 0bb5001fce

@ -143,7 +143,7 @@ class View {
* @return string Template file location * @return string Template file location
*/ */
public function getTemplate($file) { public function getTemplate($file) {
return $this->path.'/'.((substr($file, -4) == '.php') ? $file : $file.'.php'); return $this->path.'/'.basename($file, '.php').'.php';
} }
/** /**

Loading…
Cancel
Save