알림센터에서 $obj->disable_triggers 설정 추가

게시글 등록시 여러글을 한꺼번에 입력해주는 모듈을 이용할 경우 해당 모듈에서 작동할때 불필요하게 트리거를 거쳐 작업이 많이 이루어지게 됩니다. 알림센터에서 글작성 트리거를 실행하지 않고 싶다면 다음과 같이 추가하면 됩니다.

$args->disable_triggers = array('ncenterlite' => true);

위의 코드를 이용해서 알림센터 모듈의 경우 글작성 트리거를 실행하지 않도록 할 수 있습니다.
This commit is contained in:
BJRambo 2017-07-09 12:09:07 +09:00
parent 1f3bf62c34
commit 7a35c60f40

View file

@ -72,6 +72,11 @@ class ncenterliteController extends ncenterlite
function triggerAfterInsertDocument(&$obj)
{
if ($obj->disable_triggers[$this->module] === true)
{
return new Object();
}
$oModuleModel = getModel('module');
if($this->_isDisable())