Fixed a bug when reports where still sent with disabled Notifications.
authorNik Okuntseff <support@anuko.com>
Sat, 28 Jul 2018 14:13:15 +0000 (14:13 +0000)
committerNik Okuntseff <support@anuko.com>
Sat, 28 Jul 2018 14:13:15 +0000 (14:13 +0000)
WEB-INF/templates/footer.tpl
cron.php

index 5b3bf4e..028380a 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.17.94.4293 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.17.95.4294 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
index 50d5d7c..94a20dd 100644 (file)
--- a/cron.php
+++ b/cron.php
@@ -65,6 +65,10 @@ while ($val = $res->fetchRow()) {
   // Recycle global $user object, as user settings are specific for each report.
   $user = new ttUser(null, $options['user_id']);
   if (!$user->id) continue; // Skip not found user.
+
+  // Skip users with disabled Notifications plugin.
+  if (!$user->isPluginEnabled('no')) continue;
+
   // Recycle $i18n object because language is user-specific.
   $i18n->load($user->lang);