}
}
- if ($mode == "prefetch" && $csync) {
+
+ if (get_pref($link, "SYNC_COUNTERS") || ($mode == "prefetch" && $csync)) {
print "<counters>";
getAllCounters($link, $omode);
print "</counters>";
$viewfeed_ctr_interval = 60;
}
- if (time() - $_SESSION["get_all_counters_stamp"] > $viewfeed_ctr_interval) {
+ if (get_pref($link, "SYNC_COUNTERS") ||
+ time() - $_SESSION["get_all_counters_stamp"] > $viewfeed_ctr_interval) {
print "<counters>";
getAllCounters($link, $omode, $feed);
print "</counters>";
var date = new Date();
var timestamp = Math.round(date.getTime() / 1000);
+// if (getInitParam("sync_counters") == "1" ||
+// timestamp - counters_last_request > 10) {
+
if (timestamp - counters_last_request > 10) {
+
debug("scheduling request of counters...");
window.setTimeout("request_counters_real()", 1000);
counters_last_request = timestamp;
/* getting all counters is a resource intensive operation, so we
* rate limit it a little bit */
- if (time() - $_SESSION["get_all_counters_stamp"] > 5) {
+
+
+ if (get_pref($link, "SYNC_COUNTERS") ||
+ time() - $_SESSION["get_all_counters_stamp"] > 5) {
if (!$omode) $omode = "flc";
print "<param key=\"bw_limit\" value=\"".
(int) $_SESSION["bw_limit"]."\"/>";
+ print "<param key=\"sync_counters\" value=\"" .
+ (int) get_pref($link, "SYNC_COUNTERS") . "\"/>";
+
print "</init-params>";
}
__("Automatically expand articles in combined mode");
__("Purge unread articles");
__("Show special feeds when hiding read feeds");
+ __("Prefer more accurate feedlist counters to UI speed");
?>
require_once "functions.php";
define('EXPECTED_CONFIG_VERSION', 17);
- define('SCHEMA_VERSION', 37);
+ define('SCHEMA_VERSION', 38);
if (!file_exists("config.php")) {
print __("<b>Fatal Error</b>: You forgot to copy
create table ttrss_version (schema_version int not null) TYPE=InnoDB;
-insert into ttrss_version values (37);
+insert into ttrss_version values (38);
create table ttrss_enclosures (id serial not null primary key,
content_url text not null,
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('VFEED_GROUP_BY_FEED', 1, 'false', 'Group headlines in virtual feeds',2,
'When this option is enabled, headlines in Special feeds and Labels are grouped by feeds');
+insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('SYNC_COUNTERS', 1, 'false', 'Prefer more accurate feedlist counters to UI speed',3);
+
create table ttrss_user_prefs (
owner_uid integer not null,
pref_name varchar(250),
create table ttrss_version (schema_version int not null);
-insert into ttrss_version values (37);
+insert into ttrss_version values (38);
create table ttrss_enclosures (id serial not null primary key,
content_url text not null,
insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id,help_text) values('VFEED_GROUP_BY_FEED', 1, 'false', 'Group headlines in virtual feeds',2,
'When this option is enabled, headlines in Special feeds and Labels are grouped by feeds');
+insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('SYNC_COUNTERS', 1, 'false', 'Prefer more accurate feedlist counters to UI speed',3);
+
create table ttrss_user_prefs (
owner_uid integer not null references ttrss_users(id) ON DELETE CASCADE,
pref_name varchar(250) not null references ttrss_prefs(pref_name) ON DELETE CASCADE,
--- /dev/null
+insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('SYNC_COUNTERS', 1, 'false', 'Prefer more accurate feedlist counters to UI speed',3);
+
+update ttrss_version set schema_version = 38;
--- /dev/null
+insert into ttrss_prefs (pref_name,type_id,def_value,short_desc,section_id) values('SYNC_COUNTERS', 1, 'false', 'Prefer more accurate feedlist counters to UI speed',3);
+
+update ttrss_version set schema_version = 38;