[TikiWiki-commits] [Git][tikiwiki/tiki][27.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 <68dcedf668c48_2cdedb418183@gitlab-sidekiq-low-urgency-cpu-bound-v2-79f8d84998-7l4df.mail>

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


Commits:
81e125fb by Jean-Marc Kadimba at 2025-10-01T10:55:18+02:00
[BP][ENH] Tracker notifications : Allow sending notifications to oneself
---
* [BP][ENH] Tracker notifications : Allow sending notifications to oneself
---
* [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


(cherry picked from commit 5882abbe0a99eb0e03458cc34642e7d1e4987333)

133bd5fb [ENH] Tracker notifications : Allow sending notifications to oneself

Co-authored-by: Jean-Marc Kadimba <[email protected]>

See merge request tikiwiki/tiki!8691


(cherry picked from commit 1212426d5233e24a96fbe2b59e0cb4f549b9edce)

19b1aa71 [BP][ENH] Tracker notifications : Allow sending notifications to oneself

Co-authored-by: Jean-Marc Kadimba <[email protected]>

See merge request tikiwiki/tiki!8693

- - - - -


1 changed file:

- lib/trackers/trackerlib.php


Changes:

=====================================
lib/trackers/trackerlib.php
=====================================
@@ -4542,9 +4542,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) {
@@ -4691,7 +4693,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/81e125fbae82b37d76457f28c1cfb44e9ec26edd

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/81e125fbae82b37d76457f28c1cfb44e9ec26edd
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.