mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
substr_compare() 사용에 대한 보완
This commit is contained in:
parent
833d218a66
commit
4d9e68b9e4
5 changed files with 20 additions and 4 deletions
|
|
@ -253,7 +253,7 @@ class ModuleObject extends Object
|
|||
* */
|
||||
function setTemplateFile($filename)
|
||||
{
|
||||
if(substr_compare($filename, '.html', -5) !== 0)
|
||||
if(isset($filename) && substr_compare($filename, '.html', -5) !== 0)
|
||||
{
|
||||
$filename .= '.html';
|
||||
}
|
||||
|
|
@ -276,10 +276,13 @@ class ModuleObject extends Object
|
|||
* */
|
||||
function setTemplatePath($path)
|
||||
{
|
||||
if(!$path) return;
|
||||
|
||||
if(substr_compare($path, '/', 0, 1) !== 0 && substr_compare($path, './', 0, 2) !== 0)
|
||||
{
|
||||
$path = './' . $path;
|
||||
}
|
||||
|
||||
if(substr_compare($path, '/', -1) !== 0)
|
||||
{
|
||||
$path .= '/';
|
||||
|
|
@ -303,6 +306,8 @@ class ModuleObject extends Object
|
|||
* */
|
||||
function setEditedLayoutFile($filename)
|
||||
{
|
||||
if(!$filename) return;
|
||||
|
||||
if(substr_compare($filename, '.html', -5) !== 0)
|
||||
{
|
||||
$filename .= '.html';
|
||||
|
|
@ -326,6 +331,8 @@ class ModuleObject extends Object
|
|||
* */
|
||||
function setLayoutFile($filename)
|
||||
{
|
||||
if(!$filename) return;
|
||||
|
||||
if(substr_compare($filename, '.html', -5) !== 0)
|
||||
{
|
||||
$filename .= '.html';
|
||||
|
|
@ -348,6 +355,8 @@ class ModuleObject extends Object
|
|||
* */
|
||||
function setLayoutPath($path)
|
||||
{
|
||||
if(!$path) return;
|
||||
|
||||
if(substr_compare($path, '/', 0, 1) !== 0 && substr_compare($path, './', 0, 2) !== 0)
|
||||
{
|
||||
$path = './' . $path;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue