]> git.wh0rd.org - tt-rss.git/commitdiff
force DAEMON_REFRESH_ONLY, block synchronous updating
authorAndrew Dolgov <fox@madoka.spb.ru>
Tue, 25 Sep 2007 04:06:21 +0000 (05:06 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Tue, 25 Sep 2007 04:06:21 +0000 (05:06 +0100)
config.php-dist
functions.php
sanity_check.php
tt-rss.php

index 8601f5628eaa728ad1ba7c83de43c2a4e986f36b..9060ccaaf221450567d683deeda335109bc0b6f9 100644 (file)
        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
index 1160829886d0bfe14e189b39395d739655c7a2e1..430525754f59718b6bf459eafb461eac3e79cf86 100644 (file)
 
        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;                 
                }
 
 
                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") . "\"/>";
index 94bf91b2836e08bd95c5417cf8d69b242b5db969..a4f5c05c4d00ca5cb2928795e3692384519328ba 100644 (file)
                $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;
index ac75c1f90e9887e6214c6f3124ad410181f67779..4575b0983e00c76c3486c3ec1c5db7ddc27e7e20 100644 (file)
@@ -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 __('&nbsp;&nbsp;Update') ?></option>
-                                       <?php } ?>
                                        <option value="qmcCatchupAll"><?php echo __('&nbsp;&nbsp;Mark as read') ?></option>
                                        <option value="qmcShowOnlyUnread"><?php echo __('&nbsp;&nbsp;(Un)hide read feeds') ?></option>
                                        <option disabled>--------</option>