diff options
author | Andrew Dolgov <[email protected]> | 2009-04-02 11:25:23 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2009-04-02 11:25:23 +0400 |
commit | 32d2181b921907f42d6f30b06c6637f11dc7fe59 (patch) | |
tree | 73ee30e12929ff3b035b0af010a3ecc14b05d59a /functions.php | |
parent | 2e93b64ccaf76c6bb605aad38a34d01a88656c18 (diff) |
ccache: do not override owner_uid fetching for virtual feeds
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/functions.php b/functions.php index e9ef17861..8d69cc0b9 100644 --- a/functions.php +++ b/functions.php @@ -5801,9 +5801,11 @@ if (!$is_cat) { $table = "ttrss_counters_cache"; - $tmp_result = db_query($link, "SELECT owner_uid FROM ttrss_feeds - WHERE id = '$feed_id'"); - $owner_uid = db_fetch_result($tmp_result, 0, "owner_uid"); + if ($feed_id > 0) { + $tmp_result = db_query($link, "SELECT owner_uid FROM ttrss_feeds + WHERE id = '$feed_id'"); + $owner_uid = db_fetch_result($tmp_result, 0, "owner_uid"); + } } else { $table = "ttrss_cat_counters_cache"; } @@ -5835,7 +5837,7 @@ if (!is_numeric($feed_id)) return; - if (!$is_cat) { + if (!$is_cat && $feed_id > 0) { $tmp_result = db_query($link, "SELECT owner_uid FROM ttrss_feeds WHERE id = '$feed_id'"); $owner_uid = db_fetch_result($tmp_result, 0, "owner_uid"); |