rhymix/modules/document/document.class.php
zero 8326004cb2 삭제
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2327 201d5d3c-b55e-5fd7-737f-ddc643e51545
2007-08-12 03:59:52 +00:00

76 lines
2.3 KiB
PHP

<?php
/**
* @class document
* @author zero (zero@nzeo.com)
* @brief document 모듈의 high 클래스
**/
require_once('./modules/document/document.item.php');
class document extends ModuleObject {
// 공지사항용 값
var $notice_list_order = -2100000000;
// 관리자페이지에서 사용할 검색 옵션
var $search_option = array('title','content','title_content','user_name',); ///< 검색 옵션
/**
* @brief 설치시 추가 작업이 필요할시 구현
**/
function moduleInstall() {
// action forward에 등록 (관리자 모드에서 사용하기 위함)
$oModuleController = &getController('module');
$oModuleController->insertActionForward('document', 'view', 'dispDocumentAdminList');
$oModuleController->insertActionForward('document', 'view', 'dispDocumentPrint');
return new Object();
}
/**
* @brief 설치가 이상이 없는지 체크하는 method
**/
function checkUpdate() {
$oDB = &DB::getInstance();
/**
* 2007. 7. 23 : 확장변수(extra_vars1~20까지 추가)
**/
if(!$oDB->isColumnExists("documents","extra_vars20")) return true;
/**
* 2007. 7. 25 : 알림 필드(notify_message) 추가
**/
if(!$oDB->isColumnExists("documents","notify_message")) return true;
return false;
}
/**
* @brief 업데이트 실행
**/
function moduleUpdate() {
$oDB = &DB::getInstance();
/**
* 2007. 7. 23 : 확장변수(extra_vars1~20까지 추가)
**/
if(!$oDB->isColumnExists("documents","extra_vars20")) {
for($i=1;$i<=20;$i++) {
$column_name = "extra_vars".$i;
$oDB->addColumn('documents',$column_name,'text');
}
}
/**
* 2007. 7. 25 : 알림 필드(notify_message) 추가
**/
if(!$oDB->isColumnExists("documents","notify_message")) {
$oDB->addColumn('documents',"notify_message","char",1);
}
return new Object(0,'success_updated');
}
}
?>