mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-15 01:09:57 +09:00
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:
parent
cb2254ef96
commit
a2eb5d62bf
38 changed files with 299 additions and 64 deletions
|
|
@ -30,15 +30,33 @@
|
|||
/**
|
||||
* @brief 설치가 이상이 없는지 체크하는 method
|
||||
**/
|
||||
function moduleIsInstalled() {
|
||||
return new Object();
|
||||
function checkUpdate() {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
/**
|
||||
* 2007. 7. 23 : 확장변수(extra_vars1~20까지 추가)
|
||||
**/
|
||||
if(!$oDB->isColumnExists("documents","extra_vars20")) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 업데이트 실행
|
||||
**/
|
||||
function moduleUpdate() {
|
||||
return new Object();
|
||||
/**
|
||||
* 2007. 7. 23 : 확장변수(extra_vars1~20까지 추가)
|
||||
**/
|
||||
$oDB = &DB::getInstance();
|
||||
if(!$oDB->isColumnExists("documents","extra_vars20")) {
|
||||
for($i=1;$i<=20;$i++) {
|
||||
$column_name = "extra_vars".$i;
|
||||
$oDB->addColumn('documents',$column_name,'text');
|
||||
}
|
||||
}
|
||||
|
||||
return new Object(0,'success_updated');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue