- // 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) {
-
- $result = $this->dbh->query(
- "SELECT cache_images," . SUBSTRING_FOR_DATE . "(last_updated,1,19) AS last_updated
- FROM ttrss_feeds WHERE id = '$feed'");
-
- if ($this->dbh->num_rows($result) != 0) {
- $last_updated = strtotime($this->dbh->fetch_result($result, 0, "last_updated"));
- $cache_images = sql_bool_to_bool($this->dbh->fetch_result($result, 0, "cache_images"));
-
- if (!$cache_images && time() - $last_updated > 120) {
- RSSUtils::update_rss_feed($feed, true);
- } else {
- $this->dbh->query("UPDATE ttrss_feeds SET last_updated = '1970-01-01', last_update_started = '1970-01-01'
- WHERE id = '$feed'");
- }
- }
- } else {
- $this->dbh->query("UPDATE ttrss_feeds SET last_updated = '1970-01-01', last_update_started = '1970-01-01'
- WHERE id = '$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]);