|
@@ -15,8 +15,7 @@ final class Base
|
|
|
|
|
|
public static function init()
|
|
|
{
|
|
|
- Log::record("Base::init start",Log::DEBUG);
|
|
|
- global $setting_config;
|
|
|
+ global $setting_config;
|
|
|
self::parse_conf($setting_config);
|
|
|
define('MD5_KEY',md5($setting_config['md5_key']));
|
|
|
|
|
@@ -35,7 +34,6 @@ final class Base
|
|
|
Tpl::output('setting_config',$setting_config);
|
|
|
//read language
|
|
|
Language::read('core_lang_index');
|
|
|
- Log::record("Base::init end",Log::DEBUG);
|
|
|
}
|
|
|
|
|
|
public static function fini() {
|
|
@@ -124,12 +122,10 @@ final class Base
|
|
|
* run
|
|
|
*/
|
|
|
public static function run() {
|
|
|
- Log::record("Base::run start", Log::DEBUG);
|
|
|
perfor_clear();
|
|
|
self::cp();
|
|
|
self::init();
|
|
|
self::control();
|
|
|
- Log::record("Base::run end", Log::DEBUG);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -160,7 +156,6 @@ final class Base
|
|
|
*/
|
|
|
private static function control()
|
|
|
{
|
|
|
- Log::record("Base::control 1", Log::DEBUG);
|
|
|
if ($GLOBALS['setting_config']['enabled_subdomain'] == '1' && $_GET['act'] == 'index' && $_GET['op'] == 'index')
|
|
|
{
|
|
|
$store_id = subdomain();
|
|
@@ -168,7 +163,6 @@ final class Base
|
|
|
}
|
|
|
|
|
|
$act_file = realpath(BASE_PATH.'/control/'.$_GET['act'].'.php');
|
|
|
- Log::record("Base::control 2 $act_file", Log::DEBUG);
|
|
|
|
|
|
$class_name = $_GET['act'].'Control';
|
|
|
if (!@include_once($act_file))
|
|
@@ -183,29 +177,22 @@ final class Base
|
|
|
|
|
|
if (class_exists($class_name))
|
|
|
{
|
|
|
+ $main = new $class_name();
|
|
|
$function = $_GET['op'].'Op';
|
|
|
|
|
|
- Log::record("Base::control 3 0", Log::DEBUG);
|
|
|
- Log::record("act={$class_name},op={$function}",Log::DEBUG);
|
|
|
-
|
|
|
- $main = new $class_name();
|
|
|
- if (method_exists($main,$function)){
|
|
|
- Log::record("Base::control 3 1", Log::DEBUG);
|
|
|
+ Log::record("act=$class_name,op=$function",Log::DEBUG);
|
|
|
+ if (method_exists($main,$function)){
|
|
|
$main->$function();
|
|
|
} elseif (method_exists($main,'indexOp')) {
|
|
|
- Log::record("Base::control 3 2", Log::DEBUG);
|
|
|
$main->indexOp();
|
|
|
} else {
|
|
|
$error = "Base Error: function $function not in $class_name!";
|
|
|
- Log::record("Base::control 3 3", Log::DEBUG);
|
|
|
throw_exception($error);
|
|
|
}
|
|
|
} else {
|
|
|
- Log::record("Base::control 3 4", Log::DEBUG);
|
|
|
$error = "Base Error: class $class_name isn't exists!";
|
|
|
throw_exception($error);
|
|
|
}
|
|
|
- Log::record("Base::control 4", Log::DEBUG);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -214,7 +201,6 @@ final class Base
|
|
|
*/
|
|
|
private static function start_session()
|
|
|
{
|
|
|
- Log::record("session on redis path=start_session",Log::DEBUG);
|
|
|
global $config;
|
|
|
|
|
|
if (SUBDOMAIN_SUFFIX){
|