force DAEMON_REFRESH_ONLY, block synchronous updating

master
Andrew Dolgov 17 years ago
parent 31a6d42de4
commit 17c0eeba6f

@ -34,30 +34,6 @@
define('SINGLE_USER_MODE', true); define('SINGLE_USER_MODE', true);
// Operate in single user mode, disables all functionality related to // Operate in single user mode, disables all functionality related to
// multiple users. // multiple users.
define('DAEMON_REFRESH_ONLY', false);
// updates to all feeds will only run when the backend script is
// invoked with a "daemon" option on the URI stem. This is useful when you
// are hosting multi-user system and want to control how often
// feeds are being updated.
// An example wget command line below will invoke an update every 30
// minutes, with output being sent to /dev/null and the timeout set to
// 10 minutes so that wget does not time out. Substitute your site name
// and tt-rss path as necessary.
//
// */30 * * * * /usr/bin/wget -O /dev/null -T 600 "http://www.your-site.xxx/tt-rss/backend.php?op=globalUpdateFeeds&daemon=1"
//
// The alternative approach is to run update_feeds.php from your crontab
// with command line PHP interpreter. Don't forget to chdir() into TT-RSS
// directory or it won't be able to find includes. E.g.
//
// */30 * * * * cd $TTRSS_DIRECTORY && ./update_feeds.php >/dev/null 2>&1
// Another alternative approach is to run update_daemon.php in the background
// on the server, which allows user-scheduled updates and continous
// feed updating in the background. This is the recommended way at the moment.
define('SMART_RPC_COUNTERS', false); define('SMART_RPC_COUNTERS', false);
// If enabled, stores feed counter information on the server side and sends // If enabled, stores feed counter information on the server side and sends

@ -424,7 +424,7 @@
function update_rss_feed($link, $feed_url, $feed, $ignore_daemon = false) { function update_rss_feed($link, $feed_url, $feed, $ignore_daemon = false) {
if (DAEMON_REFRESH_ONLY && !$_GET["daemon"] && !$ignore_daemon) { if (!$_GET["daemon"] && !$ignore_daemon) {
return; return;
} }
@ -2657,7 +2657,7 @@
print "<param key=\"daemon_enabled\" value=\"" . ENABLE_UPDATE_DAEMON . "\"/>"; print "<param key=\"daemon_enabled\" value=\"" . ENABLE_UPDATE_DAEMON . "\"/>";
print "<param key=\"feeds_frame_refresh\" value=\"" . FEEDS_FRAME_REFRESH . "\"/>"; print "<param key=\"feeds_frame_refresh\" value=\"" . FEEDS_FRAME_REFRESH . "\"/>";
print "<param key=\"daemon_refresh_only\" value=\"" . DAEMON_REFRESH_ONLY . "\"/>"; print "<param key=\"daemon_refresh_only\" value=\"true\"/>";
print "<param key=\"on_catchup_show_next_feed\" value=\"" . print "<param key=\"on_catchup_show_next_feed\" value=\"" .
get_pref($link, "ON_CATCHUP_SHOW_NEXT_FEED") . "\"/>"; get_pref($link, "ON_CATCHUP_SHOW_NEXT_FEED") . "\"/>";

@ -74,6 +74,11 @@
$err_msg = __("config: option COUNTERS_MAX_AGE expected, but not defined"); $err_msg = __("config: option COUNTERS_MAX_AGE expected, but not defined");
} }
if (defined('DAEMON_REFRESH_ONLY') && DAEMON_REFRESH_ONLY != true) {
$err_msg = __("config: option DAEMON_REFRESH_ONLY is obsolete. Please remove this option and read about other ways to update feeds on the <a href='http://tt-rss.spb.ru/trac/wiki/UpdatingFeeds'>wiki</a>.");
}
if ($err_msg) { if ($err_msg) {
print "<b>".__("Fatal Error")."</b>: $err_msg\n"; print "<b>".__("Fatal Error")."</b>: $err_msg\n";
exit; exit;

@ -139,9 +139,6 @@ window.onload = init;
<!-- <option>Edit this feed</option> --> <!-- <option>Edit this feed</option> -->
<option disabled>--------</option> <option disabled>--------</option>
<option style="color : #5050aa" disabled><?php echo __('All feeds:') ?></option> <option style="color : #5050aa" disabled><?php echo __('All feeds:') ?></option>
<?php if (!ENABLE_UPDATE_DAEMON && !DAEMON_REFRESH_ONLY) { ?>
<option value="qmcUpdateFeeds"><?php echo __('&nbsp;&nbsp;Update') ?></option>
<?php } ?>
<option value="qmcCatchupAll"><?php echo __('&nbsp;&nbsp;Mark as read') ?></option> <option value="qmcCatchupAll"><?php echo __('&nbsp;&nbsp;Mark as read') ?></option>
<option value="qmcShowOnlyUnread"><?php echo __('&nbsp;&nbsp;(Un)hide read feeds') ?></option> <option value="qmcShowOnlyUnread"><?php echo __('&nbsp;&nbsp;(Un)hide read feeds') ?></option>
<option disabled>--------</option> <option disabled>--------</option>

Loading…
Cancel
Save