From a2dd39df73d6c29073dbd8d7d87f34adf9aef621 Mon Sep 17 00:00:00 2001 From: rub Date: Tue, 28 Mar 2006 22:33:29 +0000 Subject: [NBM] Step 5: Change notification queries in order to try to optimize treatment duration. git-svn-id: http://piwigo.org/svn/trunk@1112 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/notification_by_mail.php | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'admin') diff --git a/admin/notification_by_mail.php b/admin/notification_by_mail.php index c6212299a..9959708ee 100644 --- a/admin/notification_by_mail.php +++ b/admin/notification_by_mail.php @@ -230,14 +230,14 @@ order by include(get_language_filepath('admin.lang.php')); } - $message = ''; - $news = news($row['last_send'], $dbnow); - if (count($news) > 0) + if ($is_action_send) { - array_push($return_list, $row); - - if ($is_action_send) + $message = ''; + $news = news($row['last_send'], $dbnow); + if (count($news) > 0) { + array_push($return_list, $row); + $subject = '['.$conf['gallery_title'].']: '.l10n('nbm_ContentObject'); $message .= sprintf(l10n('nbm_ContentHello'), $row['username']).",\n\n"; @@ -281,6 +281,13 @@ order by } } } + else + { + if (news_exists($row['last_send'], $dbnow)) + { + array_push($return_list, $row); + } + } } // Restore $user, $lang_info and $lang arrays (include/user.inc.php has been executed) -- cgit v1.2.3