rhymix/modules/tccommentnotify/tccommentnotify.class.php
haneul de2b57c2d2 #484
* 댓글알리미 module 추가


git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4326 201d5d3c-b55e-5fd7-737f-ddc643e51545
2008-06-25 23:12:36 +00:00

61 lines
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');
$oModuleController->insertActionForward('tccommentnotify', 'view', 'dispCommentNotifyAdminIndex');
// notify를 위한 트리거 추가
$oModuleController->insertTrigger('comment.insertComment', 'tccommentnotify', 'controller', 'triggerInsertComment', 'after');
return new Object();
}
/**
* @brief 설치가 이상이 없는지 체크하는 method
**/
function checkUpdate() {
$oModuleModel = &getModel('module');
if(!$oModuleModel->getTrigger('comment.insertComment', 'tccommentnotify', 'controller', 'triggerInsertComment', 'after'))
{
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');
}
return new Object(0, 'success_updated');
}
/**
* @brief 캐시 파일 재생성
**/
function recompileCache() {
}
}
?>