[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [BP][ENH] Tracker notifications : Allow sending notifications to oneself

"Jean-Marc Kadimba \(@jmkadimba\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <68dce5afbd231_2c1b61a38852d5@gitlab-sidekiq-low-urgency-cpu-bound-v2-79f8d84998-nn85r.mail>

Jean-Marc Kadimba pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki


Commits:
5882abbe by Jean-Marc Kadimba at 2025-10-01T10:19:36+02:00
[BP][ENH] Tracker notifications : Allow sending notifications to oneself
---
* [ENH] Tracker notifications : Allow sending notifications to oneself
---
* [ENH] Tracker notifications : Allow sending notifications to oneself

* [ENH] Tracker notifications : Allow sending notifications to oneself

See merge request tikiwiki/tiki!8629

See merge request tikiwiki/tiki!8690

- - - - -


1 changed file:

- lib/trackers/trackerlib.php


Changes:

=====================================
lib/trackers/trackerlib.php
=====================================
@@ -4541,9 +4541,11 @@ class TrackerLib extends TikiLib
                 }
             }
             for ($i = count($watchers_local) - 1; $i >= 0; --$i) {
-                if ($watchers_local[$i]['user'] == $user) {
-                    unset($watchers_local[$i]);
-                    break;
+                if ((isset($watchers_local[$i]['options_map_notify']) && $watchers_local[$i]['options_map_notify'] != 1) || ! isset($watchers_local[$i]['options_map_notify'])) {
+                    if ($watchers_local[$i]['user'] == $user) {
+                        unset($watchers_local[$i]);
+                        break;
+                    }
                 }
             }
             for ($i = count($watchers_item) - 1; $i >= 0; --$i) {
@@ -4690,7 +4692,7 @@ class TrackerLib extends TikiLib
                         if (! empty($fieldUser) && ! empty($email)) {
                             $tikilib->get_user_preferences($fieldUser, ['email', 'user', 'language', 'mailCharset']);
                             $emails[] = ['email' => $email, 'user' => $fieldUser, 'language' => isset($user_preferences[$fieldUser]['language']) ? $user_preferences[$fieldUser]['language'] : null,
-                                'mailCharset' => $user_preferences[$fieldUser]['mailCharset'] ?? $prefs['users_prefs_mailCharset'], 'template' => $f['options_map']['notify_template'], 'templateFormat' => $f['options_map']['notify_template_format']];
+                                         'mailCharset' => $user_preferences[$fieldUser]['mailCharset'] ?? $prefs['users_prefs_mailCharset'], 'template' => $f['options_map']['notify_template'], 'templateFormat' => $f['options_map']['notify_template_format'], 'options_map_notify' => $f['options_map']['notify']];
                         }
                     }
                 }



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/5882abbe0a99eb0e03458cc34642e7d1e4987333

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/5882abbe0a99eb0e03458cc34642e7d1e4987333
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.