summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-12-31 07:37:49 +0300
committerAndrew Dolgov <[email protected]>2017-12-31 07:37:49 +0300
commit8dedacf497c31560bb8723cfe02b84921f44d576 (patch)
treeae0836875c4fa9005e886ccfabc89299feeec3a3 /classes
parent9274109c19e2f5ac1b222d9c67e791cbd3596b1e (diff)
remove synchronous feed refreshing on ForceUpdate
Diffstat (limited to 'classes')
-rwxr-xr-xclasses/feeds.php51
1 files changed, 4 insertions, 47 deletions
diff --git a/classes/feeds.php b/classes/feeds.php
index 98507d361..5814f06b1 100755
--- a/classes/feeds.php
+++ b/classes/feeds.php
@@ -173,53 +173,10 @@ class Feeds extends Handler_Protected {
$method_split = explode(":", $method);
if ($method == "ForceUpdate" && $feed > 0 && is_numeric($feed)) {
- // Update the feed if required with some basic flood control
-
- $any_needs_curl = false;
-
- if (ini_get("open_basedir")) {
- $pluginhost = PluginHost::getInstance();
- foreach ($pluginhost->get_plugins() as $plugin) {
- $flags = $plugin->flags();
-
- if (isset($flags["needs_curl"]) && $flags["needs_curl"]) {
- $any_needs_curl = true;
- break;
- }
- }
- }
-
- //if ($_REQUEST["debug"]) print "<!-- any_needs_curl: $any_needs_curl -->";
-
- if (!$any_needs_curl) {
-
- $sth = $this->pdo->prepare("SELECT cache_images," . SUBSTRING_FOR_DATE . "(last_updated,1,19) AS last_updated
- FROM ttrss_feeds WHERE id = ?");
- $sth->execute([$feed]);
-
- if ($row = $sth->fetch()) {
- $last_updated = strtotime($row["last_updated"]);
- $cache_images = $row["cache_images"];
-
- if (!$cache_images && time() - $last_updated > 120) {
- try {
- RSSUtils::update_rss_feed($feed, true);
- } catch (PDOException $e) {
- user_error("PDO Exception while doing on-demand feed update for $feed: " . $e->getMessage(), E_USER_NOTICE);
- }
- } else {
- $sth = $this->pdo->prepare("UPDATE ttrss_feeds
- SET last_updated = '1970-01-01', last_update_started = '1970-01-01'
- WHERE id = ?");
- $sth->execute([$feed]);
- }
- }
- } else {
- $sth = $this->pdo->prepare("UPDATE ttrss_feeds
- SET last_updated = '1970-01-01', last_update_started = '1970-01-01'
- WHERE id = ?");
- $sth->execute([$feed]);
- }
+ $sth = $this->pdo->prepare("UPDATE ttrss_feeds
+ SET last_updated = '1970-01-01', last_update_started = '1970-01-01'
+ WHERE id = ?");
+ $sth->execute([$feed]);
}
if ($method_split[0] == "MarkAllReadGR") {