mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
substr_compare() 사용에 대한 보완
This commit is contained in:
parent
833d218a66
commit
4d9e68b9e4
5 changed files with 20 additions and 4 deletions
|
|
@ -448,10 +448,12 @@ class Context
|
|||
unset($db_info->db_userid);
|
||||
$db_info->master_db["db_table_prefix"] = $db_info->db_table_prefix;
|
||||
unset($db_info->db_table_prefix);
|
||||
if(substr_compare($db_info->master_db["db_table_prefix"], '_', -1) !== 0)
|
||||
|
||||
if(isset($db_info->master_db["db_table_prefix"]) && substr_compare($db_info->master_db["db_table_prefix"], '_', -1) !== 0)
|
||||
{
|
||||
$db_info->master_db["db_table_prefix"] .= '_';
|
||||
}
|
||||
|
||||
$db_info->slave_db = array($db_info->master_db);
|
||||
$self->setDBInfo($db_info);
|
||||
|
||||
|
|
@ -633,6 +635,7 @@ class Context
|
|||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if(substr_compare($default_url, '/', -1) !== 0)
|
||||
{
|
||||
$default_url .= '/';
|
||||
|
|
@ -841,6 +844,7 @@ class Context
|
|||
global $lang;
|
||||
|
||||
if(!$path) return;
|
||||
|
||||
$_path = 'eval://' . $path;
|
||||
|
||||
if(in_array($_path, $this->loaded_lang_files))
|
||||
|
|
@ -872,6 +876,7 @@ class Context
|
|||
function _loadXmlLang($path)
|
||||
{
|
||||
if(!$path) return;
|
||||
|
||||
$oXmlLangParser = new XmlLangParser($path . ((substr_compare($path, '/', -1) !== 0) ? '/' : '') . 'lang.xml', $this->lang_type);
|
||||
return $oXmlLangParser->compile();
|
||||
}
|
||||
|
|
@ -885,6 +890,7 @@ class Context
|
|||
function _loadPhpLang($path)
|
||||
{
|
||||
if(!$path) return;
|
||||
|
||||
if(substr_compare($path, '/', -1) !== 0)
|
||||
{
|
||||
$path .= '/';
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class FileHandler
|
|||
*/
|
||||
function getRealPath($source)
|
||||
{
|
||||
if(strlen($source) > 2 && substr_compare($source, './', 0, 2) === 0)
|
||||
if(isset() && substr_compare($source, './', 0, 2) === 0)
|
||||
{
|
||||
return _XE_PATH_ . substr($source, 2);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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