diff --git a/config.php-dist b/config.php-dist index 6564da668..0eb796715 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 2085d6067..410c76eac 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 b1d57585e..44cfbf571 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 85c92689a..cd1ea5506 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.');