mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-22 12:49:55 +09:00
* 댓글알리미 module 추가 git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4326 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
56f7c52f7d
commit
de2b57c2d2
37 changed files with 1036 additions and 0 deletions
61
modules/tccommentnotify/tccommentnotify.class.php
Normal file
61
modules/tccommentnotify/tccommentnotify.class.php
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
<?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() {
|
||||
}
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue