Esempio n. 1
0
 protected function _postSaveAfterTransaction()
 {
     $response = parent::_postSaveAfterTransaction();
     if ($this->get('message_state') == 'visible') {
         $contentData = array_merge(array('content_type' => 'post', 'content_id' => $this->get('post_id')), $this->getDiscussionData(), $this->getMergedData());
         $forumInfo = $this->_Tinhte_XenTag_getForumInfo();
         $contentPermissionConfig = array('content_type' => 'node', 'content_id' => $forumInfo['node_id'], 'permissions' => array('view', 'viewOthers', 'viewContent'));
         Tinhte_XenTag_Integration::sendNotificationToWatchUsersOnTagged('post', $this->get('post_id'), $contentData, $this, $contentPermissionConfig);
     }
     return $response;
 }
Esempio n. 2
0
 protected function _postSaveAfterTransaction()
 {
     $response = parent::_postSaveAfterTransaction();
     if ($this->get('resource_state') == 'visible' and $this->get('description_update_id') > 0) {
         $contentData = array_merge(array('content_type' => 'resource_update', 'content_id' => $this->get('description_update_id')), $this->getMergedData(), $this->getDescriptionDw()->getMergedData());
         if (Tinhte_XenTag_Option::xfrmFound() >= 1010000) {
             // XenForo Resource Manager 1.1 introduces category permission
             $contentPermissionConfig = array('content_type' => 'resource_category', 'content_id' => $this->get('resource_category_id'), 'permissions' => array('view'));
         } else {
             $contentPermissionConfig = array();
         }
         Tinhte_XenTag_Integration::sendNotificationToWatchUsersOnTagged(Tinhte_XenTag_Constants::CONTENT_TYPE_RESOURCE, $this->get('resource_id'), $contentData, $this, $contentPermissionConfig);
     }
     return $response;
 }