diff --git a/config/loader.php b/config/loader.php index 82bf8a6d..44eaf73e 100644 --- a/config/loader.php +++ b/config/loader.php @@ -53,10 +53,9 @@ if ($hDirConfig = opendir($sDirConfig)) { /** - * Инклудим все *.php файлы из каталога {DIR_SERVER_ENGINE}/include/ - это файлы ядра + * Инклудим все *.php файлы из каталога {path.root.engine}/include/ - это файлы ядра */ $sDirInclude=Config::get('path.root.engine').'/include/'; -$sDirInclude=DIR_SERVER_ENGINE.'/include/'; if ($hDirInclude = opendir($sDirInclude)) { while (false !== ($sFileInclude = readdir($hDirInclude))) { $sFileIncludePathFull=$sDirInclude.$sFileInclude; @@ -71,7 +70,7 @@ if ($hDirInclude = opendir($sDirInclude)) { } /** - * Инклудим все *.php файлы из каталога {DIR_SERVER_ROOT}/include/ - пользовательские файлы + * Инклудим все *.php файлы из каталога {path.root.server}/include/ - пользовательские файлы */ $sDirInclude=Config::get('path.root.server').'/include/'; if ($hDirInclude = opendir($sDirInclude)) { diff --git a/engine/classes/Router.class.php b/engine/classes/Router.class.php index c596eb5f..cf05681c 100644 --- a/engine/classes/Router.class.php +++ b/engine/classes/Router.class.php @@ -301,7 +301,7 @@ class Router extends Object { * @param string $action * @return string */ - static public function getPath($action) { + static public function GetPath($action) { $aRoutes = array_flip(self::getInstance()->aConfigRoute['page']); // Если пользователь запросил action по умолчанию if($action == 'default') { diff --git a/engine/lib/internal/ConfigSimple/Config.class.php b/engine/lib/internal/ConfigSimple/Config.class.php index 4757bc84..198cf884 100644 --- a/engine/lib/internal/ConfigSimple/Config.class.php +++ b/engine/lib/internal/ConfigSimple/Config.class.php @@ -135,12 +135,7 @@ class Config { } // Get config from file $aConfig=include($sFile); - if(!is_array($aConfig)) { - return false; - } - // Set config to current or handle instance - self::getInstance($sInstance)->SetConfig($aConfig,$bRewrite); - return self::getInstance($sInstance); + return self::Load($aConfig,$bRewrite,$sInstance); } /** @@ -352,7 +347,7 @@ class Config { } } if (is_array($v2) and !$bIsKeyInt and isset($aArr1[$k2])) { - $aRes[$k2]=func_array_merge_assoc($aArr1[$k2],$v2); + $aRes[$k2]=$this->func_array_merge_assoc($aArr1[$k2],$v2); } else { $aRes[$k2]=$v2; } diff --git a/engine/modules/viewer/plugs/function.router.php b/engine/modules/viewer/plugs/function.router.php index a8798553..db2d4a5a 100644 --- a/engine/modules/viewer/plugs/function.router.php +++ b/engine/modules/viewer/plugs/function.router.php @@ -30,7 +30,7 @@ function smarty_function_router($aParams,&$oSmarty) { } require_once(DIR_SERVER_ROOT.'/classes/engine/Router.class.php'); - if(!$sPath = Router::getPath($aParams['page'])) { + if(!$sPath = Router::GetPath($aParams['page'])) { $oSmarty->trigger_error("Router: unknown 'page' given"); return ; }