Piotr Labudda 10 лет назад
Родитель
Сommit
c7bbaf7a5f
2 измененных файлов с 4 добавлено и 5 удалено
  1. 3 2
      SE/se-lib/Route/Cron.php
  2. 1 3
      SE/se-lib/Route/Notify.php

+ 3 - 2
SE/se-lib/Route/Cron.php

@@ -117,8 +117,9 @@ class Route_Cron extends RouteBase {
 		foreach ($todoReminders as $who => $listWhen) {
 			foreach ($listWhen as $when => $listWhat) {
 				if (!empty($listWhat)) {
-					$notify->send($who, array_keys($listWhat), $forceMail = 'plabudda@biall-net.pl');
-					$notify->markAsSent($usrLogin, array_keys($listWhat));
+					$reminders = array_keys($listWhat);
+					$notify->send($who, $reminders, $forceMail = 'plabudda@biall-net.pl');
+					$notify->markAsSent($who, $reminders);
 				}
 			}
 		}

+ 1 - 3
SE/se-lib/Route/Notify.php

@@ -725,9 +725,7 @@ function refreshPreview() {
 		$sth = DB::getPDO()->prepare("
 			select n.`who`, n.`when`, n.`what`, UNIX_TIMESTAMP(n.last_exec_time) as last_exec_time
 			from ADMIN_USERS u
-				left join CRM_NOTIFY n on(n.`who` = u.ADM_ACCOUNT
-					and (n.last_exec_time is null or n.last_exec_time < NOW())
-				)
+				left join CRM_NOTIFY n on(n.`who` = u.ADM_ACCOUNT)
 			where u.A_STATUS = 'NORMAL'
 				and u.EMPLOYEE_TYPE = 'Pracownik'
 				and n.`who` is not null