diff --git a/classes/template/TemplateHandler.class.php b/classes/template/TemplateHandler.class.php index 2d20c6df9..e5ae37dd1 100644 --- a/classes/template/TemplateHandler.class.php +++ b/classes/template/TemplateHandler.class.php @@ -44,7 +44,7 @@ function init($tpl_path, $tpl_filename, $tpl_file) { // verify arguments if(substr($tpl_path,-1)!='/') $tpl_path .= '/'; - if(substr($tpl_filename,-5)!='.html') $tpl_filename .= '.html'; + if(!file_exists($tpl_path.$tpl_filename)&&file_exists($tpl_path.$tpl_filename.'.html')) $tpl_filename .= '.html'; // create tpl_file variable if(!$tpl_file) $tpl_file = $tpl_path.$tpl_filename; @@ -131,7 +131,8 @@ exit(); } - return $this->parse(); + $this->parse(); + return $this->buff; } /** diff --git a/modules/opage/opage.view.php b/modules/opage/opage.view.php index db544f3d0..e6556d91e 100644 --- a/modules/opage/opage.view.php +++ b/modules/opage/opage.view.php @@ -150,13 +150,12 @@ // .. 와 같은 경우 대상 경로를 구함 elseif(preg_match('/^\.\./i',$val)) { - $p = Context::pathToUrl($this->path); + $p = Context::pathToUrl($this->path).'/'; return sprintf("%s%s%s%s",$matches[1],$matches[2],$p.$val,$matches[4]); } if(substr($val,0,2)=='./') $val = substr($val,2); - //$p = '/'.str_replace(_XE_PATH_,'',$this->path); - $p = Context::pathToUrl($this->path); + $p = Context::pathToUrl($this->path).'/'; return sprintf("%s%s%s%s",$matches[1],$matches[2],$p.$val,$matches[4]); }