mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5785 201d5d3c-b55e-5fd7-737f-ddc643e51545
60 lines
2.2 KiB
PHP
60 lines
2.2 KiB
PHP
<?php
|
|
/**
|
|
* @class tccommentnotify
|
|
* @author haneul (haneul0318@gmail.com)
|
|
* @brief tccommentnotify module's class
|
|
**/
|
|
|
|
class tccommentnotify extends ModuleObject {
|
|
|
|
var $cachedir = "./files/cache/tccommentnotify/";
|
|
var $cachefile = "shouldnotify";
|
|
var $lockfile = "notify.lock";
|
|
|
|
/**
|
|
* @brief Install tccommentnotify module
|
|
**/
|
|
function moduleInstall() {
|
|
// action forward에 등록 (관리자 모드에서 사용하기 위함)
|
|
$oModuleController = &getController('module');
|
|
|
|
// notify를 위한 트리거 추가
|
|
$oModuleController->insertTrigger('comment.insertComment', 'tccommentnotify', 'controller', 'triggerInsertComment', 'after');
|
|
$oModuleController->insertActionForward('tccommentnotify', 'view', 'dispCommentNotifyAdminIndex');
|
|
|
|
return new Object();
|
|
}
|
|
|
|
/**
|
|
* @brief 설치가 이상이 없는지 체크하는 method
|
|
**/
|
|
function checkUpdate() {
|
|
$oModuleModel = &getModel('module');
|
|
if(!$oModuleModel->getTrigger('comment.insertComment', 'tccommentnotify', 'controller', 'triggerInsertComment', 'after')) return true;
|
|
if(!$oModuleModel->getActionForward('dispCommentNotifyAdminIndex')) return true;
|
|
|
|
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* @brief 업데이트 실행
|
|
**/
|
|
function moduleUpdate() {
|
|
$oModuleModel = &getModel('module');
|
|
$oModuleController = &getController('module');
|
|
if(!$oModuleModel->getTrigger('comment.insertComment', 'tccommentnotify', 'controller', 'triggerInsertComment', 'after'))
|
|
$oModuleController->insertTrigger('comment.insertComment', 'tccommentnotify', 'controller', 'triggerInsertComment', 'after');
|
|
if(!$oModuleModel->getActionForward('dispCommentNotifyAdminIndex'))
|
|
$oModuleController->insertActionForward('tccommentnotify', 'view', 'dispCommentNotifyAdminIndex');
|
|
|
|
return new Object(0, 'success_updated');
|
|
}
|
|
|
|
/**
|
|
* @brief 캐시 파일 재생성
|
|
**/
|
|
function recompileCache() {
|
|
}
|
|
}
|
|
?>
|