summaryrefslogtreecommitdiff
path: root/include/ccache.php
diff options
context:
space:
mode:
authorYoungMin Park <[email protected]>2014-11-04 11:49:43 +0900
committerYoungMin Park <[email protected]>2014-11-04 11:49:43 +0900
commita5bbb2bec133bdee08b361628f32430ae3884107 (patch)
treeb203105149ec234ebe155d5718d2cbb6390b4a45 /include/ccache.php
parent12727ad17d125eb2f3f243231ccca1cb0a5a7b4b (diff)
parent2f43089de1ead3f164b8b31967d1abbb784319fa (diff)
Merge pull request #1 from gothfox/master
Update from original
Diffstat (limited to 'include/ccache.php')
-rw-r--r--include/ccache.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/include/ccache.php b/include/ccache.php
index d89b9efe0..406dec81d 100644
--- a/include/ccache.php
+++ b/include/ccache.php
@@ -92,7 +92,7 @@
}
function ccache_update($feed_id, $owner_uid, $is_cat = false,
- $update_pcat = true) {
+ $update_pcat = true, $pcat_fast = false) {
if (!is_numeric($feed_id)) return;
@@ -127,11 +127,13 @@
/* Recalculate counters for child feeds */
- $result = db_query("SELECT id FROM ttrss_feeds
+ if (!$pcat_fast) {
+ $result = db_query("SELECT id FROM ttrss_feeds
WHERE owner_uid = '$owner_uid' AND $cat_qpart");
- while ($line = db_fetch_assoc($result)) {
- ccache_update($line["id"], $owner_uid, false, false);
+ while ($line = db_fetch_assoc($result)) {
+ ccache_update($line["id"], $owner_uid, false, false);
+ }
}
$result = db_query("SELECT SUM(value) AS sv
@@ -177,7 +179,7 @@
$cat_id = (int) db_fetch_result($result, 0, "cat_id");
- ccache_update($cat_id, $owner_uid, true);
+ ccache_update($cat_id, $owner_uid, true, true, true);
}
}