private function initApp()
{
$GLOBALS['time_run_detail']['action_init_app_start'] = microtime(true);
//是否为核心的应用
if (in_array(APP_NAME, C('DEFAULT_APPS'))) {
return true;
}
//加载后台已安装应用列表
$GLOBALS['ts']['app'] = $this->app = model('App')->getAppByName(APP_NAME);
if (empty($this->app) || !$this->app) {
$this->error('此应用不存在');
return false;
}
if (!empty($this->app) && $this->app['status'] == 0) {
$this->error('此应用已经关闭');
return false;
}
Addons::hook('core_filter_init_app');
$GLOBALS['time_run_detail']['action_init_app_end'] = microtime(true);
return true;
}