summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2019-11-17 13:17:21 +0300
committerAndrew Dolgov <[email protected]>2019-11-17 13:17:21 +0300
commit8c3efd51ecd76f4e9ffeb111bbbe2c5862aa3bed (patch)
tree56285994c149ebcfb4f50ed74a26219395d32831
parentcd4b7f1988633272fc46655e9cf2796a75668e07 (diff)
reset domain hit quota on feed update start
-rwxr-xr-xclasses/rssutils.php2
-rw-r--r--include/functions.php6
2 files changed, 8 insertions, 0 deletions
diff --git a/classes/rssutils.php b/classes/rssutils.php
index bff4bd9fc..3db758b48 100755
--- a/classes/rssutils.php
+++ b/classes/rssutils.php
@@ -259,6 +259,8 @@ class RSSUtils {
*/
static function update_rss_feed($feed, $no_cache = false) {
+ reset_fetch_domain_quota();
+
Debug::log("start", Debug::$LOG_VERBOSE);
$pdo = Db::pdo();
diff --git a/include/functions.php b/include/functions.php
index 750707626..c6d33d2fd 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -164,6 +164,12 @@
Debug::log($msg);
}
+ function reset_fetch_domain_quota() {
+ global $fetch_domain_hits;
+
+ $fetch_domain_hits = [];
+ }
+
// TODO: max_size currently only works for CURL transfers
// TODO: multiple-argument way is deprecated, first parameter is a hash now
function fetch_file_contents($options /* previously: 0: $url , 1: $type = false, 2: $login = false, 3: $pass = false,