if ($subop == "forceUpdateAllFeeds" || $subop == "updateAllFeeds") {
- if (ENABLE_UPDATE_SCHEDULER) {
+ if (ENABLE_UPDATE_DAEMON) {
$result = db_query($link, "SELECT count(id) AS cid FROM
ttrss_scheduled_updates WHERE feed_id IS NULL AND
update_all_feeds($link, $subop == "forceUpdateAllFeeds");
}
- if (!(ENABLE_UPDATE_SCHEDULER && $subop == "forceUpdateAllFeeds")) {
+ $omode = $_GET["omode"];
- $omode = $_GET["omode"];
+ if (!$omode) $omode = "tfl";
- if (!$omode) $omode = "tfl";
-
- print "<rpc-reply>";
- if (strchr($omode, "l")) getLabelCounters($link);
- if (strchr($omode, "f")) getFeedCounters($link);
- if (strchr($omode, "t")) getTagCounters($link);
- if (get_pref($link, 'ENABLE_FEED_CATS')) {
- getCategoryCounters($link);
- }
- getGlobalCounters($link);
- print "</rpc-reply>";
+ print "<rpc-reply>";
+ if (strchr($omode, "l")) getLabelCounters($link);
+ if (strchr($omode, "f")) getFeedCounters($link);
+ if (strchr($omode, "t")) getTagCounters($link);
+ if (get_pref($link, 'ENABLE_FEED_CATS')) {
+ getCategoryCounters($link);
}
+ getGlobalCounters($link);
+ print "</rpc-reply>";
+
}
/* GET["cmode"] = 0 - mark as read, 1 - as unread, 2 - toggle */
if ($subop == "ForceUpdate" && sprintf("%d", $feed) > 0) {
-/* if (ENABLE_UPDATE_SCHEDULER) {
+/* if (ENABLE_UPDATE_DAEMON) {
if ($cid == 0) {
$tmp_result = db_query($link, "SELECT feed_url FROM ttrss_feeds
WHERE id = '$feed'");
$feed_url = db_fetch_result($tmp_result, 0, "feed_url");
- update_rss_feed($link, $feed_url, $feed, ENABLE_UPDATE_SCHEDULER);
+ update_rss_feed($link, $feed_url, $feed, ENABLE_UPDATE_DAEMON);
}
if ($subop == "MarkAllRead") {
// It is also recommended to set FEEDS_FRAME_REFRESH to a lower value if using
// this option.
- define('ENABLE_UPDATE_SCHEDULER', false);
+ define('ENABLE_UPDATE_DAEMON', false);
// This enables different mechanism for user-triggered updates designed
// for update daemon running in background on the server.
- // This option _REQUIRES_ DAEMON_REFRESH_ONLY to be enabled and it is
- // suggested to set FEEDS_FRAME_REFRESH to a small value (like 15-30 seconds).
+ // This option suggests FEEDS_FRAME_REFRESH set to a small value
+ // (like 10-15 seconds, depending on number of users and server/bandwidth load).
// vim:ft=php
?>
<select id="allFeedsChooser" onchange="allFeedsMenuChange()">
<option selected>All feeds...</option>
+ <? if (!ENABLE_UPDATE_DAEMON) { ?>
<option>Update</option>
+ <? } ?>
<option>Mark as read</option>
<option>Show only unread</option>
</select>
<!-- <option>Edit this feed</option> -->
<option disabled>--------</option>
<option style="color : #5050aa" disabled>All feeds:</option>
+ <? if (!ENABLE_UPDATE_DAEMON) { ?>
<option id="qmcUpdateFeeds"> Update</option>
- <option id="qmcCatchupAll"> Mark as read</option>
+ <? } ?>
+ <option id="qmcCatchupAll"> Mark as read</option>
<option id="qmcShowOnlyUnread"> Show only unread</option>
<option disabled>--------</option>
<option style="color : #5050aa" disabled>Other actions:</option>
while (true) {
- // FIXME: get all schedule updates w/forced refetch
+ // FIXME: get all scheduled updates w/forced refetch
- print "Checking schedules updates (NOT IMPLEMENTED YET)\n";
+# $result = db_query($link, "SELECT * FROM ttrss_scheduled_updates ORDER BY id");
+# while ($line = db_fetch_assoc($result)) {
+# print "Scheduled feed update: " . $line["feed_id"] . ", UID: " .
+# $line["owner_uid"] . "\n";
+# }
// Process all other feeds using last_updated and interval parameters