4include_once
'./Modules/Forum/interfaces/interface.ilForumNotificationMailData.php';
5include_once
'./Modules/Forum/classes/class.ilForumProperties.php';
78 $this->db =
$DIC->database();
79 $this->access =
$DIC->access();
80 $this->
user = $DIC->user();
109 return $this->objPost->getThreadId();
117 return $this->objPost->getId();
149 return $this->objPost->getSubject();
157 return $this->objPost->getMessage();
165 return $this->objPost->getDisplayUserId();
173 return $this->objPost->getCreateDate();
181 return $this->objPost->getChangeDate();
188 return $this->objPost->isCensored();
196 return $this->objPost->getCensoredDate();
201 return $this->objPost->getCensorshipComment();
217 return $this->objPost->getUserAlias();
232 return $this->objPost->getImportName();
240 return $this->objPost->getUpdateUserId();
248 if ($this->post_user_name ===
null) {
268 if ($this->update_user_name ===
null) {
281 if ($this->objPost->getUserAlias() && $this->objPost->getDisplayUserId() == 0
282 && $this->objPost->getPosAuthorId() == $this->objPost->getUpdateUserId()) {
283 return (
string) $this->objPost->getUserAlias();
300 if ($authorinfo->
getAuthorName() && !$this->isAnonymized()) {
325 SELECT thr_subject FROM frm_threads
328 array($this->objPost->getThreadId())
332 $this->thread_title =
$row[
'thr_subject'];
342 SELECT top_pk, top_name, frm_settings.anonymized FROM frm_data
343 INNER JOIN frm_settings ON top_frm_fk = frm_settings.obj_id
344 WHERE top_frm_fk = %s',
350 $this->forum_id =
$row[
'top_pk'];
351 $this->forum_title =
$row[
'top_name'];
352 $this->is_anonymized = (bool)
$row[
'anonymized'];
361 require_once
'Modules/Forum/classes/class.ilFileDataForum.php';
363 $filesOfPost = $fileDataForum->getFilesOfPost();
365 require_once
'Services/Mail/classes/class.ilFileDataMail.php';
368 foreach ($filesOfPost as $attachment) {
369 $this->attachments[$attachment[
'path']] = $attachment[
'name'];
370 $fileDataMail->copyAttachmentFile($attachment[
'path'], $attachment[
'name']);
380 $res = $this->db->queryf(
382 SELECT frm_notification.user_id FROM frm_notification, frm_data
383 WHERE frm_data.top_pk = %s
384 AND frm_notification.frm_id = frm_data.top_frm_fk
385 AND frm_notification.user_id != %s
386 GROUP BY frm_notification.user_id',
387 array(
'integer',
'integer'),
394 while (
$row = $this->db->fetchAssoc(
$res)) {
396 foreach ((array) $frm_references as
$ref_id) {
397 if ($this->access->checkAccessOfUser(
$row[
'user_id'],
'read',
'',
$ref_id)) {
398 $rcps[] =
$row[
'user_id'];
404 return array_unique($rcps);
416 $res = $this->db->queryf(
418 SELECT frm_notification.user_id
419 FROM frm_notification
420 INNER JOIN frm_threads ON frm_threads.thr_pk = frm_notification.thread_id
421 WHERE frm_notification.thread_id = %s
422 AND frm_notification.user_id != %s',
423 array(
'integer',
'integer'),
430 while (
$row = $this->db->fetchAssoc(
$res)) {
431 foreach ((array) $frm_references as
$ref_id) {
432 if ($this->access->checkAccessOfUser(
$row[
'user_id'],
'read',
'',
$ref_id)) {
433 $usrIds[] =
$row[
'user_id'];
438 return array_unique($usrIds);
446 include_once
'./Modules/Forum/classes/class.ilForumPost.php';
447 $parent_objPost =
new ilForumPost($this->objPost->getParentId());
450 $rcps[] = $parent_objPost->getPosAuthorId();
460 include_once
'./Modules/Forum/classes/class.ilForum.php';
463 return (array) $rcps;
490 return (
string) $this->objPost->getUserAlias();
492 return $DIC->user()->getLogin();
502 if ($this->objPost->getUserAlias() && $this->objPost->getDisplayUserId() == 0
503 && $this->objPost->getPosAuthorId() ==
$DIC->user()->getId()) {
An exception for terminatinating execution or to throw for unit testing.
This class handles all operations on files for the forum object.
This class handles all operations on files (attachments) in directory ilias_data/mail.
static isSendAttachmentsByMailEnabled()
static _getModerators($a_ref_id)
get all users assigned to local role il_frm_moderator_<frm_ref_id> (static)
Class ilObjForumNotificationDataProvider.
getPostAnsweredRecipients()
getPublicUserInformation(ilForumAuthorInformation $authorinfo)
setPosAuthorId($pos_author_id)
getPostUserName(\ilLanguage $user_lang)
string
getThreadNotificationRecipients()
getForumNotificationRecipients()
getPostUpdateUserName(\ilLanguage $user_lang)
string
getPostActivationRecipients()
__construct(ilForumPost $objPost, $ref_id)
static _lookupObjId($a_id)
static _getAllReferences($a_id)
get all reference ids of object
Interface ilForumNotificationMailData.
foreach($_POST as $key=> $value) $res