getLabelCounters: skip processing when labels are disabled; misc performance tweaks
This commit is contained in:
parent
34c30ac126
commit
abd9b16507
|
@ -358,7 +358,7 @@
|
|||
// }
|
||||
|
||||
if (get_pref($link, 'COMBINED_DISPLAY_MODE') || $subop ||
|
||||
time() - $_SESSION["viewfeed:counters_stamp"] > 30) {
|
||||
time() - $_SESSION["viewfeed:counters_stamp"] > 60) {
|
||||
if (!$offset) {
|
||||
print "<counters>";
|
||||
getAllCounters($link, $omode, $feed);
|
||||
|
|
|
@ -2678,6 +2678,7 @@
|
|||
$ret_arr["-3"]["description"] = __("Fresh articles");
|
||||
}
|
||||
|
||||
if (GLOBAL_ENABLE_LABELS && get_pref($link, 'ENABLE_LABELS')) {
|
||||
|
||||
$result = db_query($link, "SELECT owner_uid,id,sql_exp,description FROM
|
||||
ttrss_labels WHERE owner_uid = ".$_SESSION["uid"]." ORDER by description");
|
||||
|
@ -2720,6 +2721,7 @@
|
|||
|
||||
error_reporting (DEFAULT_ERROR_LEVEL);
|
||||
}
|
||||
}
|
||||
|
||||
if ($smart_mode && $lctrs_modified) {
|
||||
$_SESSION["lctr_last_value"] = $old_counters;
|
||||
|
|
Loading…
Reference in New Issue