]> git.wh0rd.org Git - tt-rss.git/commitdiff
digest: use proper logging, update.php: fix typo
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 12 Apr 2013 05:55:41 +0000 (09:55 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 12 Apr 2013 05:55:41 +0000 (09:55 +0400)
include/digest.php
update.php

index ab29d94326756bc2cb1a6b2b5a645b5e7b10de3f..34b69909474226cbd733b7d6fe7c1cbdc73f9a25 100644 (file)
@@ -33,7 +33,7 @@
                                if ($preferred_ts && time() >= $preferred_ts &&
                                                time() - $preferred_ts <= 7200) {
 
-                                       if ($debug) print "Sending digest for UID:" . $line['id'] . " - " . $line["email"] . " ... ";
+                                       if ($debug) _debug("Sending digest for UID:" . $line['id'] . " - " . $line["email"]);
 
                                        $do_catchup = get_pref($link, 'DIGEST_CATCHUP', $line['id'], false);
 
 
                                                $rc = $mail->quickMail($line["email"], $line["login"] , DIGEST_SUBJECT, $digest, $digest_text);
 
-                                               if (!$rc && $debug) print "ERROR: " . $mail->ErrorInfo;
+                                               if (!$rc && $debug) _debug("ERROR: " . $mail->ErrorInfo);
 
-                                               if ($debug) print "RC=$rc\n";
+                                               if ($debug) _debug("RC=$rc");
 
                                                if ($rc && $do_catchup) {
-                                                       if ($debug) print "Marking affected articles as read...\n";
+                                                       if ($debug) _debug("Marking affected articles as read...");
                                                        catchupArticlesById($link, $affected_ids, 0, $line["id"]);
                                                }
                                        } else {
-                                               if ($debug) print "No headlines\n";
+                                               if ($debug) _debug("No headlines");
                                        }
 
                                        db_query($link, "UPDATE ttrss_users SET last_digest_sent = NOW()
index e1afb6bd6e927e71d6667cab611daed9d45a1f36..4c5bede0b5ad290dc370f384760f3464ccb1f402 100755 (executable)
 
        if (file_exists(LOCK_DIRECTORY . "/$lock_filename"))
                unlink(LOCK_DIRECTORY . "/$lock_filename");
-g?>
+?>