diff options
author | Andrew Dolgov <[email protected]> | 2007-09-25 05:06:21 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2007-09-25 05:06:21 +0100 |
commit | 17c0eeba6f590865dccd4fdb25b4c14c7c8b8b10 (patch) | |
tree | 06b3686065138ab8c363b63fe743ab788dc6b9bf | |
parent | 31a6d42de4be9cb20317a7744190c891cd1ded55 (diff) |
force DAEMON_REFRESH_ONLY, block synchronous updating
-rw-r--r-- | config.php-dist | 24 | ||||
-rw-r--r-- | functions.php | 4 | ||||
-rw-r--r-- | sanity_check.php | 5 | ||||
-rw-r--r-- | tt-rss.php | 3 |
4 files changed, 7 insertions, 29 deletions
diff --git a/config.php-dist b/config.php-dist index 8601f5628..9060ccaaf 100644 --- a/config.php-dist +++ b/config.php-dist @@ -34,30 +34,6 @@ define('SINGLE_USER_MODE', true); // Operate in single user mode, disables all functionality related to // 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); // If enabled, stores feed counter information on the server side and sends diff --git a/functions.php b/functions.php index 116082988..430525754 100644 --- a/functions.php +++ b/functions.php @@ -424,7 +424,7 @@ 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; } @@ -2657,7 +2657,7 @@ print "<param key=\"daemon_enabled\" value=\"" . ENABLE_UPDATE_DAEMON . "\"/>"; 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=\"" . get_pref($link, "ON_CATCHUP_SHOW_NEXT_FEED") . "\"/>"; diff --git a/sanity_check.php b/sanity_check.php index 94bf91b28..a4f5c05c4 100644 --- a/sanity_check.php +++ b/sanity_check.php @@ -74,6 +74,11 @@ $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) { print "<b>".__("Fatal Error")."</b>: $err_msg\n"; exit; diff --git a/tt-rss.php b/tt-rss.php index ac75c1f90..4575b0983 100644 --- a/tt-rss.php +++ b/tt-rss.php @@ -139,9 +139,6 @@ window.onload = init; <!-- <option>Edit this feed</option> --> <option disabled>--------</option> <option style="color : #5050aa" disabled><?php echo __('All feeds:') ?></option> - <?php if (!ENABLE_UPDATE_DAEMON && !DAEMON_REFRESH_ONLY) { ?> - <option value="qmcUpdateFeeds"><?php echo __(' Update') ?></option> - <?php } ?> <option value="qmcCatchupAll"><?php echo __(' Mark as read') ?></option> <option value="qmcShowOnlyUnread"><?php echo __(' (Un)hide read feeds') ?></option> <option disabled>--------</option> |