// Update the feed if required with some basic flood control
$result = db_query($this->link,
- "SELECT cache_images,cache_content,".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated
+ "SELECT cache_images,".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated
FROM ttrss_feeds WHERE id = '$feed'");
if (db_num_rows($result) != 0) {
$last_updated = strtotime(db_fetch_result($result, 0, "last_updated"));
$cache_images = sql_bool_to_bool(db_fetch_result($result, 0, "cache_images"));
- $cache_content = sql_bool_to_bool(db_fetch_result($result, 0, "cache_content"));
- if (!$cache_images && !$cache_content && time() - $last_updated > 120 || isset($_REQUEST['DevForceUpdate'])) {
+ if (!$cache_images && time() - $last_updated > 120 || isset($_REQUEST['DevForceUpdate'])) {
include "rssfuncs.php";
update_rss_feed($this->link, $feed, true, true);
} else {
$feed_title = $qfh_ret[1];
$feed_site_url = $qfh_ret[2];
$last_error = $qfh_ret[3];
- $cache_content = true;
$vgroup_last_feed = $vgr_last_feed;
$feed_site_url = $line["site_url"];
- if ($cache_content && $line["cached_content"] != "") {
- $line["content_preview"] =& $line["cached_content"];
- }
-
$reply['content'] .= "<span id=\"CWRAP-$id\">";
$reply['content'] .= $line["content"];
$reply['content'] .= "</span>";
db_escape_string($_POST["include_in_digest"]));
$cache_images = checkbox_to_sql_bool(
db_escape_string($_POST["cache_images"]));
- $cache_content = checkbox_to_sql_bool(
- db_escape_string($_POST["cache_content"]));
$always_display_enclosures = checkbox_to_sql_bool(
db_escape_string($_POST["always_display_enclosures"]));
auth_pass = '$auth_pass',
private = $private,
cache_images = $cache_images,
- cache_content = $cache_content,
include_in_digest = $include_in_digest,
always_display_enclosures = $always_display_enclosures,
mark_unread_on_update = $mark_unread_on_update
$qpart = "cache_images = $cache_images";
break;
- case "cache_content":
- $qpart = "cache_content = $cache_content";
- break;
-
case "cat_id":
$qpart = $category_qpart_nocomma;
break;
}
}
- if ($cache_content && $line["cached_content"] != "") {
- $line["content"] =& $line["cached_content"];
- }
-
$rv['content'] .= $line["content"];
$rv['content'] .= format_article_enclosures($link, $id,
}
}
- function cache_content($link, $url, $login, $pass) {
-
- $content = fetch_file_contents($url, $login, $pass);
-
- if ($content) {
- $doc = new DOMDocument();
- @$doc->loadHTML($content);
- $xpath = new DOMXPath($doc);
-
- $node = $doc->getElementsByTagName('body')->item(0);
-
- if ($node) {
- $content = $doc->saveXML($node);
-
- return $content;
- }
- }
-
- return "";
- }
-
function make_guid_from_title($title) {
return preg_replace("/[ \"\',.:;]/", "-",
mb_strtolower(strip_tags($title), 'utf-8'));