#472 세션을 파일기반이 아닌 DB기반으로 사용하도록 변경하고 접속자 출력 위젯 추가

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4290 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2008-06-18 06:56:29 +00:00
parent 474ca4df06
commit ea2fede30e
42 changed files with 702 additions and 111 deletions

View file

@ -63,7 +63,7 @@
// 애드온 실행 (모듈 실행 전)
$called_position = 'before_module_init';
@include("./files/cache/activated_addons.cache.php");
@include(_XE_PATH_."files/cache/activated_addons.cache.php");
}
/**
@ -251,10 +251,7 @@
* @brief module의 위치를 찾아서 return
**/
function getModulePath($module) {
$class_path = sprintf('./modules/%s/', $module);
if(is_dir($class_path)) return $class_path;
return "";
return sprintf('./modules/%s/', $module);
}
/**
@ -262,7 +259,7 @@
**/
function &getModuleInstance($module, $type = 'view', $kind = '') {
$class_path = ModuleHandler::getModulePath($module);
if(!$class_path) return NULL;
if(!is_dir(_XE_PATH_.$class_path)) return NULL;
if(__DEBUG__==3) $start_time = getMicroTime();
@ -277,7 +274,7 @@
// 상위 클래스명 구함
if(!class_exists($module)) {
$high_class_file = sprintf('%s%s.class.php', $class_path, $module);
$high_class_file = sprintf('%s%s%s.class.php', _XE_PATH_,$class_path, $module);
if(!file_exists($high_class_file)) return NULL;
require_once($high_class_file);
}
@ -287,33 +284,33 @@
case 'controller' :
if($kind == 'admin') {
$instance_name = sprintf("%sAdmin%s",$module,"Controller");
$class_file = sprintf('%s%s.admin.%s.php', $class_path, $module, $type);
$class_file = sprintf('%s%s%s.admin.%s.php', _XE_PATH_, $class_path, $module, $type);
} else {
$instance_name = sprintf("%s%s",$module,"Controller");
$class_file = sprintf('%s%s.%s.php', $class_path, $module, $type);
$class_file = sprintf('%s%s%s.%s.php', _XE_PATH_, $class_path, $module, $type);
}
break;
case 'model' :
if($kind == 'admin') {
$instance_name = sprintf("%sAdmin%s",$module,"Model");
$class_file = sprintf('%s%s.admin.%s.php', $class_path, $module, $type);
$class_file = sprintf('%s%s%s.admin.%s.php', _XE_PATH_, $class_path, $module, $type);
} else {
$instance_name = sprintf("%s%s",$module,"Model");
$class_file = sprintf('%s%s.%s.php', $class_path, $module, $type);
$class_file = sprintf('%s%s%s.%s.php', _XE_PATH_, $class_path, $module, $type);
}
break;
case 'class' :
$instance_name = $module;
$class_file = sprintf('%s%s.class.php', $class_path, $module);
$class_file = sprintf('%s%s%s.class.php', _XE_PATH_, $class_path, $module);
break;
default :
$type = 'view';
if($kind == 'admin') {
$instance_name = sprintf("%sAdmin%s",$module,"View");
$class_file = sprintf('%s%s.admin.view.php', $class_path, $module, $type);
$class_file = sprintf('%s%s%s.admin.view.php', _XE_PATH_, $class_path, $module, $type);
} else {
$instance_name = sprintf("%s%s",$module,"View");
$class_file = sprintf('%s%s.view.php', $class_path, $module, $type);
$class_file = sprintf('%s%s%s.view.php', _XE_PATH_, $class_path, $module, $type);
}
break;
}
@ -361,7 +358,7 @@
$oModuleModel = &getModel('module');
$cache_dir = sprintf("./files/cache/triggers/");
$cache_dir = sprintf("%sfiles/cache/triggers/",_XE_PATH_);
if(!is_dir($cache_dir)) FileHandler::makeDir($cache_dir);
$cache_file = sprintf("%s%s.%s", $cache_dir, $trigger_name, $called_position);

View file

@ -228,7 +228,7 @@
* @brief template 경로 지정
**/
function setTemplatePath($path) {
if(substr($path,0,2)!='./') $path = './'.$path;
if(substr($path,0,1)!='/' && substr($path,0,2)!='./') $path = './'.$path;
if(substr($path,-1)!='/') $path .= '/';
$this->template_path = $path;
}
@ -274,8 +274,8 @@
* @brief layout 경로 지정
**/
function setLayoutPath($path) {
if(substr($path,0,1)!='/' && substr($path,0,2)!='./') $path = './'.$path;
if(substr($path,-1)!='/') $path .= '/';
if(substr($path,0,2)!='./') $path = './'.$path;
$this->layout_path = $path;
}
@ -297,7 +297,7 @@
// addon 실행(called_position 를 before_module_proc로 하여 호출)
$called_position = 'before_module_proc';
@include("./files/cache/activated_addons.cache.php");
@include(_XE_PATH_."files/cache/activated_addons.cache.php");
// 지금까지 이상이 없었다면 action 실행
if(!$this->stop_proc) {
@ -347,7 +347,7 @@
// addon 실행(called_position 를 after_module_proc로 하여 호출)
$called_position = 'after_module_proc';
@include("./files/cache/activated_addons.cache.php");
@include(_XE_PATH_."files/cache/activated_addons.cache.php");
if(is_a($output, 'Object') || is_subclass_of($output, 'Object')) {
$this->setError($output->getError());