aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2006-03-28 22:33:29 +0000
committerrub <rub@piwigo.org>2006-03-28 22:33:29 +0000
commita2dd39df73d6c29073dbd8d7d87f34adf9aef621 (patch)
treeffc21b9c1248709eb43941e8c40b7bf7cc6e1d04 /admin
parent39c2bfb3b1b8ad36af101b5aac7ab5d47f4d8ecb (diff)
[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
Diffstat (limited to '')
-rw-r--r--admin/notification_by_mail.php19
1 files changed, 13 insertions, 6 deletions
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)