diff options
author | Andrew Dolgov <[email protected]> | 2011-12-25 00:17:22 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2011-12-25 00:17:22 +0400 |
commit | 036cd3a4106cf2eee0be72f0695458dfb517976b (patch) | |
tree | caa0f67ab20cc2f97b10f0db5763b17789b26720 /include | |
parent | be512431ebf4a7738aba002c19f9f6d4a9ce0a91 (diff) |
globalUpdateFeeds: disable debugging info
Diffstat (limited to 'include')
-rw-r--r-- | include/functions.php | 6 | ||||
-rw-r--r-- | include/rssfuncs.php | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/functions.php b/include/functions.php index 679e0b215..e561d8e3d 100644 --- a/include/functions.php +++ b/include/functions.php @@ -2633,14 +2633,14 @@ * @param integer $limit The maximum number of articles by digest. * @return boolean Return false if digests are not enabled. */ - function send_headlines_digests($link, $limit = 100) { + function send_headlines_digests($link, $limit = 100, $debug = true) { require_once 'lib/phpmailer/class.phpmailer.php'; $user_limit = 15; // amount of users to process (e.g. emails to send out) $days = 1; - print "Sending digests, batch of max $user_limit users, days = $days, headline limit = $limit\n\n"; + if ($debug) _debug("Sending digests, batch of max $user_limit users, days = $days, headline limit = $limit"); if (DB_TYPE == "pgsql") { $interval_query = "last_digest_sent < NOW() - INTERVAL '$days days'"; @@ -2709,7 +2709,7 @@ } } - print "All done.\n"; + if ($debug) _debug("All done."); } diff --git a/include/rssfuncs.php b/include/rssfuncs.php index 7588428de..0fc462c48 100644 --- a/include/rssfuncs.php +++ b/include/rssfuncs.php @@ -147,7 +147,7 @@ } // Send feed digests by email if needed. - send_headlines_digests($link); + send_headlines_digests($link, 100, $debug); } // function update_daemon_common |