]> git.wh0rd.org - tt-rss.git/commitdiff
globalUpdateFeeds: disable debugging info
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 24 Dec 2011 20:17:22 +0000 (00:17 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 24 Dec 2011 20:17:22 +0000 (00:17 +0400)
classes/public_handler.php
include/functions.php
include/rssfuncs.php

index 0c38a0464b99a8ee34ca1a3847011021cd4ce014..0896e498c26177a435f721143dc6a16ef591ac90 100644 (file)
@@ -304,7 +304,7 @@ class Public_Handler extends Handler {
        function globalUpdateFeeds() {
                include "rssfuncs.php";
                // Update all feeds needing a update.
-               update_daemon_common($this->link, 0, true, true);
+               update_daemon_common($this->link, 0, true, false);
        }
 }
 ?>
index 679e0b2155d3594b09ba28f5a971dd3a21dac557..e561d8e3dcef3fd56fe7a8322cacb8c55eb5dfad 100644 (file)
         * @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'";
                        }
                }
 
-               print "All done.\n";
+               if ($debug) _debug("All done.");
 
        }
 
index 7588428de958b14d1838c45e1c5cf54599bf840e..0fc462c48728cf0ae2562ab5f75627430f65e0ae 100644 (file)
                }
 
                // Send feed digests by email if needed.
-               send_headlines_digests($link);
+               send_headlines_digests($link, 100, $debug);
 
        } // function update_daemon_common