mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Fix error when loading external page in document root folder
This commit is contained in:
parent
63fa80db82
commit
9ce7593820
2 changed files with 7 additions and 2 deletions
|
|
@ -93,11 +93,16 @@ class TemplateHandler
|
|||
{
|
||||
// verify arguments
|
||||
$tpl_path = trim(preg_replace('@^' . preg_quote(\RX_BASEDIR, '@') . '|\./@', '', str_replace('\\', '/', $tpl_path)), '/') . '/';
|
||||
if($tpl_path === '/' || !is_dir($tpl_path))
|
||||
if($tpl_path === '/')
|
||||
{
|
||||
$tpl_path = '';
|
||||
}
|
||||
elseif(!is_dir(\RX_BASEDIR . $tpl_path))
|
||||
{
|
||||
$this->resetState();
|
||||
return;
|
||||
}
|
||||
|
||||
if(!file_exists(\RX_BASEDIR . $tpl_path . $tpl_filename) && file_exists(\RX_BASEDIR . $tpl_path . $tpl_filename . '.html'))
|
||||
{
|
||||
$tpl_filename .= '.html';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue