X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=classes%2Ffeeds.php;h=09bfdea7257fcdd4df4262424b9af0fceb82e020;hb=5f211e37a4b654742dfca4c7d60f38d0ab09b352;hp=878306730b49bc50b7b44a05fe77ae2cebd5f45a;hpb=003a7447c3cba9b1108b0a97d1263e7a72261f5b;p=tt-rss.git
diff --git a/classes/feeds.php b/classes/feeds.php
index 87830673..09bfdea7 100755
--- a/classes/feeds.php
+++ b/classes/feeds.php
@@ -173,49 +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) {
- RSSUtils::update_rss_feed($feed, true);
- } 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") {
@@ -316,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)) {
@@ -339,6 +299,8 @@ class Feeds extends Handler_Protected {
$label_cache = $line["label_cache"];
$labels = false;
+ $mouseover_attrs = "onmouseover='postMouseIn(event, $id)' onmouseout='postMouseOut($id)'";
+
if ($label_cache) {
$label_cache = json_decode($label_cache, true);
@@ -367,29 +329,13 @@ class Feeds extends Handler_Protected {
++$num_unread;
}
- if ($line["marked"]) {
- $marked_pic = "";
- $class .= " marked";
- } else {
- $marked_pic = "
";
- }
+ $marked_pic_src = $line["marked"] ? "mark_set.png" : "mark_unset.png";
+ $class .= $line["marked"] ? " marked" : "";
+ $marked_pic = "
";
- if ($line["published"]) {
- $published_pic = "
";
- $class .= " published";
- } else {
- $published_pic = "
";
- }
+ $published_pic_src = $line["published"] ? "pub_set.png" : "pub_unset.png";
+ $class .= $line["published"] ? " published" : "";
+ $published_pic = "
";
$updated_fmt = make_local_datetime($line["updated"], false, false, false, true);
$date_entered_fmt = T_sprintf("Imported at %s",
@@ -416,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 = "
";
@@ -446,7 +390,7 @@ class Feeds extends Handler_Protected {
$vf_catchup_link = "".__('mark feed as read')."";
- $reply['content'] .= "