DAEMON_REFRESH_ONLY makes a lot more sense as a global option

This commit is contained in:
Andrew Dolgov 2005-11-23 13:26:29 +01:00
parent b83c75451c
commit 30a49c9227
4 changed files with 14 additions and 11 deletions

View File

@ -24,4 +24,15 @@
// 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"
//
?>

View File

@ -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");

View File

@ -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.');

View File

@ -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.');