X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=classes%2Ffeeds.php;h=0a7b7a241b94247632e16f93621bf5e3cf863b9b;hb=5aa9c604943cbb93f4d401914dafeedfddb0007e;hp=8c103828ff7c63a7fec7604344e022aa42fab489;hpb=320a3ba52941d1dd5dca7ed1c31dcc780f9af027;p=tt-rss.git
diff --git a/classes/feeds.php b/classes/feeds.php
index 8c103828..0a7b7a24 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 "";
-
- 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") {
@@ -320,7 +277,6 @@ class Feeds extends Handler_Protected {
$lnum = $offset;
$num_unread = 0;
if ($_REQUEST["debug"]) $timing_info = print_checkpoint("PS", $timing_info);
- $expand_cdm = get_pref('CDM_EXPANDED');
if (is_object($result)) {
@@ -389,7 +345,7 @@ class Feeds extends Handler_Protected {
$score_pic = "images/" . get_score_pic($score);
- $score_pic = "";
if ($score > 500) {
@@ -406,9 +362,7 @@ class Feeds extends Handler_Protected {
$entry_author = " — $entry_author";
}
- $has_feed_icon = feeds::feedHasIcon($feed_id);
-
- if ($has_feed_icon) {
+ if (feeds::feedHasIcon($feed_id)) {
$feed_icon_img = "
";
} else {
$feed_icon_img = "
";
@@ -436,7 +390,7 @@ class Feeds extends Handler_Protected {
$vf_catchup_link = "".__('mark feed as read')."";
- $reply['content'] .= "