if move the document to the recycle bin, and also delete the relevant notifty.

This commit is contained in:
BJRambo 2016-05-14 01:39:10 +09:00
parent 10d7cd4b0c
commit eaefd1bafe
2 changed files with 17 additions and 0 deletions

View file

@ -43,6 +43,7 @@ class ncenterlite extends ModuleObject
array('communication.sendMessage', 'ncenterlite', 'controller', 'triggerAfterSendMessage', 'after'),
array('document.updateVotedCount', 'ncenterlite', 'controller', 'triggerAfterVotedupdate', 'after'),
array('moduleHandler.init', 'ncenterlite', 'controller', 'triggerAddMemberMenu', 'after'),
array('document.moveDocumentToTrash', 'ncenterlite', 'controller', 'triggerAfterMoveToTrash', 'after'),
);
private $delete_triggers = array(
array('moduleObject.proc', 'ncenterlite', 'controller', 'triggerBeforeModuleObjectProc', 'before')

View file

@ -432,6 +432,22 @@ class ncenterliteController extends ncenterlite
return new Object();
}
function triggerAfterMoveToTrash(&$obj)
{
$oNcenterliteModel = getModel('ncenterlite');
$config = $oNcenterliteModel->getConfig();
if(empty($config->use))
{
return new Object();
}
$args = new stdClass();
$args->srl = $obj->document_srl;
$output = executeQuery('ncenterlite.deleteNotifyBySrl', $args);
return new Object();
}
function triggerAfterModuleHandlerProc(&$oModule)
{
$vars = Context::getRequestVars();