From: Andrew Dolgov Date: Wed, 23 Nov 2005 12:26:29 +0000 (+0100) Subject: DAEMON_REFRESH_ONLY makes a lot more sense as a global option X-Git-Tag: schema_feature_freeze_for_1.1~123 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=30a49c9227c0230093829646d6dc52c1fdf512dc;p=tt-rss.git DAEMON_REFRESH_ONLY makes a lot more sense as a global option --- diff --git a/config.php-dist b/config.php-dist index 6564da66..0eb79671 100644 --- a/config.php-dist +++ b/config.php-dist @@ -23,5 +23,16 @@ 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. 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, tt-rss + // path, and username/password as necessary. + // + // */30 * * * * /usr/bin/wget -O /dev/null -T 600 "http://username:password@www.your-site.xxx/tt-rss/backend.php?op=updateAllFeeds&daemon=1" + // + ?> diff --git a/functions.php b/functions.php index 2085d606..410c76ea 100644 --- a/functions.php +++ b/functions.php @@ -91,10 +91,8 @@ purge_old_posts($link); } - if (get_pref($link, 'DAEMON_REFRESH_ONLY', $user_id)) { - if (!$_GET["daemon"]) { - return; - } + if (DAEMON_REFRESH_ONLY && !$_GET["daemon"]) { + return; } db_query($link, "BEGIN"); diff --git a/schema/ttrss_schema_mysql.sql b/schema/ttrss_schema_mysql.sql index b1d57585..44cfbf57 100644 --- a/schema/ttrss_schema_mysql.sql +++ b/schema/ttrss_schema_mysql.sql @@ -188,9 +188,6 @@ insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) valu insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('DEFAULT_ARTICLE_LIMIT', 3, '0', 'Default article limit',2, 'Default limit for articles to display, any custom number you like (0 - disables).'); -insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('DAEMON_REFRESH_ONLY', 1, 'false', 'Daemon refresh only', 3, - 'Updates to all feeds will only run when the backend script is invoked with a "daemon" option on the URI stem.'); - insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('DISPLAY_FEEDLIST_ACTIONS', 1, 'false', 'Display feedlist actions',2, 'Display separate dropbox for feedlist actions, if disabled these actions are available in global actions menu.'); diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql index 85c92689..cd1ea550 100644 --- a/schema/ttrss_schema_pgsql.sql +++ b/schema/ttrss_schema_pgsql.sql @@ -172,9 +172,6 @@ insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) valu insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('DEFAULT_ARTICLE_LIMIT', 3, '0', 'Default article limit',2, 'Default limit for articles to display, any custom number you like (0 - disables).'); -insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('DAEMON_REFRESH_ONLY', 1, 'false', 'Daemon refresh only', 3, - 'Updates to all feeds will only run when the backend script is invoked with a "daemon" option on the URI stem.'); - insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('DISPLAY_FEEDLIST_ACTIONS', 1, 'false', 'Display feedlist actions',2, 'Display separate dropbox for feedlist actions, if disabled these actions are available in global actions menu.');