Module의 업데이트 필요 현황을 파악하고 업데이트를 할 수 있는 코드 추가. db의 column exists정보와 add column 기능 추가

git-svn-id: http://xe-core.googlecode.com/svn/trunk@1974 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-07-23 07:35:47 +00:00
parent cb2254ef96
commit a2eb5d62bf
38 changed files with 299 additions and 64 deletions

View file

@ -27,8 +27,8 @@
/**
* @brief 설치가 이상이 없는지 체크하는 method
**/
function moduleIsInstalled() {
return new Object();
function checkUpdate() {
return false;
}
/**

View file

@ -514,8 +514,14 @@
$info->path = $path;
$info->admin_index_act = $info->admin_index_act;
if($table_count > $created_table_count) $info->is_installed = false;
else $info->is_installed = true;
// 설치 유무 체크 (설치는 DB의 설치만 관리)
if($table_count > $created_table_count) $info->need_installed = false;
else $info->need_installed = true;
// 각 모듈의 module.class.php로 upgrade 유무 체크
$oDummy = null;
$oDummy = &getModule($module_name, 'class');
if($oDummy) $info->need_update = $oDummy->checkUpdate();
$list[] = $info;
}

View file

@ -43,3 +43,10 @@ function completeInstallModule(ret_obj) {
alert(ret_obj['message']);
location.href = location.href;
}
/* 모듈 업그레이드 */
function doUpdateModule(module) {
var params = new Array();
params['module_name'] = module;
exec_xml('install','procInstallAdminUpdate',params, completeInstallModule);
}

View file

@ -40,9 +40,11 @@
<td class="blue"><a href="#" onclick="popopen('{getUrl('','module','module','act','dispModuleAdminInfo','selected_module',$val->module)}','module_info');return false">{$lang->cmd_view}</a></td>
<td class="red">
<!--@if($val->need_update)-->
<a href="#">{$lang->cmd_update}</a>
<!--@else-->
<a href="#" onclick="doUpdateModule('{$val->module}'); return false;">{$lang->cmd_update}</a>
<!--@elseif($val->need_install)-->
<a href="#" onclick="doInstallModule('{$val->module}');return false;">{$lang->cmd_install}</a>
<!--@else-->
&nbsp;
<!--@end-->
</td>
<td>