55         if ($a_wiki_ref_id === 0) {
    64         $log->
debug(
"start... vvvvvvvvvvvvvvvvvvvvvvvvvvv");
    66         $ilUser = $this->domain->user();
    67         $ilAccess = $this->domain->access();
    69         $wiki = $this->domain->wiki()->object($a_wiki_ref_id);
    70         $wiki_id = $wiki->getId();
    73         $pgui = $this->gui->page()->getWikiPageGUI(
    79         $page = $pgui->getPageObject();
    82         $ignore_threshold = ($a_action === 
"comment");
    85         if ($a_action === 
"new") {
    93             $users = array_merge($users, $wiki_users);
    95                 $log->
debug(
"no notifications... ^^^^^^^^^^^^^^^^^^");
   101             if (!count($users)) {
   102                 $log->
debug(
"no notifications... ^^^^^^^^^^^^^^^^^^");
   112             $link = \ilLink::_getLink(null, 
"wiki", [], 
"wpage_" . $a_page_id . 
"_" . $a_wiki_ref_id);
   114             $link = \ilLink::_getLink($a_wiki_ref_id);
   118         $pgui->setRawPageContent(
true);
   119         $pgui->setAbstractOnly(
true);
   120         $pgui->setFileDownloadLink(
".");
   121         $pgui->setFullscreenLink(
".");
   122         $pgui->setSourcecodeDownloadScript(
".");
   123         $snippet = $pgui->showPage();
   127         $snippet = str_replace([
'<br/>', 
'<br />', 
'</p>', 
'</div>'], 
"\n", $snippet);
   129         $snippet = trim(strip_tags($snippet));
   132         $hist = $page->getHistoryEntries();
   133         $current_version = array_shift($hist);
   134         $current_version = $current_version[
"nr"] ?? 0;
   135         if (!$current_version && $a_action !== 
"comment") {
   142         foreach (array_unique($users) as $idx => 
$user_id) {
   143             if (
$user_id !== $ilUser->getId() &&
   144                 $ilAccess->checkAccessOfUser(
$user_id, 
'read', 
'', $a_wiki_ref_id)) {
   147                 $ulng->loadLanguageModule(
'wiki');
   149                 if ($a_action === 
"comment") {
   150                     $subject = sprintf($ulng->txt(
'wiki_notification_comment_subject'), $wiki->getTitle(), $page->getTitle());
   153                     $message .= $ulng->txt(
'wiki_notification_' . $a_action) . 
":\n\n";
   154                     $message .= $ulng->txt(
'wiki') . 
": " . $wiki->getTitle() . 
"\n";
   155                     $message .= $ulng->txt(
'page') . 
": " . $page->getTitle() . 
"\n";
   160                         $message .= 
"\n" . $ulng->txt(
'comment') . 
":\n\"" . trim($a_comment) . 
"\"\n";
   163                     $message .= 
"\n" . $ulng->txt(
'wiki_change_notification_page_link') . 
": " . $link;
   165                     $subject = sprintf($ulng->txt(
'wiki_change_notification_subject'), $wiki->getTitle(), $page->getTitle());
   170                         $message .= $ulng->txt(
'wiki_change_notification_page_body_' . $a_action) . 
":\n\n";
   171                         $message .= $ulng->txt(
'wiki') . 
": " . $wiki->getTitle() . 
"\n";
   172                         $message .= $ulng->txt(
'page') . 
": " . $page->getTitle() . 
"\n";
   176                             $message .= 
"\n" . $ulng->txt(
'content') . 
"\n" .
   177                                 "----------------------------------------\n" .
   179                                 "----------------------------------------\n";
   184                             $message .= 
"\n" . $ulng->txt(
'comment') . 
":\n\"" . trim($a_comment) . 
"\"\n";
   187                         $message .= 
"\n" . $ulng->txt(
'wiki_change_notification_page_link') . 
": " . $link;
   190                         $message .= $ulng->txt(
'wiki_change_notification_body_' . $a_action) . 
":\n\n";
   191                         $message .= $ulng->txt(
'wiki') . 
": " . $wiki->getTitle() . 
"\n";
   192                         $message .= $ulng->txt(
'page') . 
": " . $page->getTitle() . 
"\n";
   196                             $message .= $ulng->txt(
'content') . 
"\n" .
   197                                 "----------------------------------------\n" .
   199                                 "----------------------------------------\n\n";
   202                         $message .= $ulng->txt(
'wiki_change_notification_link') . 
": " . $link;
   207                 $mail_obj->appendInstallationSignature(
true);
   208                 $log->
debug(
"before enqueue ($user_id)");
   219                 $mails[] = new \ilMailValueObject(
   235         if (count($mails) > 0) {
   236             $processor = new \ilMassMailTaskProcessor();
   244         $log->
debug(
"end... ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
 
static _lookupFullname(int $a_user_id)
 
static getNotificationsForObject(int $type, int $id, ?int $page_id=null, bool $ignore_threshold=false)
Get all users/recipients for given object. 
 
static truncateHTML(string $a_text, int $a_length=100, string $a_ending='...', bool $a_exact=false, bool $a_consider_html=true)
Truncate (html) string. 
 
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path='ilpublicuserprofilegui')
Default behaviour is: 
 
static _getLanguageOfUser(int $a_usr_id)
Get language object of user. 
 
static updateNotificationTime(int $type, int $id, array $user_ids, ?int $page_id=null, bool $activate_new_entries=true)
Update the last mail timestamp for given object and users. 
 
debug(string $message, array $context=[])
 
static _getInstallationSignature()
 
static _lookupLogin(int $a_user_id)