mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-07-03 06:55:03 +03:00
fix
This commit is contained in:
parent
5614dc23e0
commit
10231ffac3
|
@ -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)) {
|
||||
|
|
|
@ -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') {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 ;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue