]> git.wh0rd.org Git - tt-rss.git/commitdiff
remove cache_content remnants
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 16 Mar 2013 12:11:58 +0000 (16:11 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 16 Mar 2013 12:11:58 +0000 (16:11 +0400)
classes/feeds.php
classes/pref/feeds.php
include/functions.php
include/rssfuncs.php

index dd9a4f588515f338d5436fc525e692b78397cd75..62142b47cb9136526a93170cceac9fca9eed2b73 100644 (file)
@@ -165,15 +165,14 @@ class Feeds extends Handler_Protected {
                        // 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 {
@@ -224,7 +223,6 @@ class Feeds extends Handler_Protected {
                $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;
 
@@ -618,10 +616,6 @@ class Feeds extends Handler_Protected {
 
                                        $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>";
index 2ed7b1b241f87393e307de375bf98adffba6f1f3..bfcc75f0d4c0cd1b30a710fd7ef5ed104292b3b6 100644 (file)
@@ -856,8 +856,6 @@ class Pref_Feeds extends Handler_Protected {
                        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"]));
@@ -889,7 +887,6 @@ class Pref_Feeds extends Handler_Protected {
                                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
@@ -955,10 +952,6 @@ class Pref_Feeds extends Handler_Protected {
                                                $qpart = "cache_images = $cache_images";
                                                break;
 
-                                       case "cache_content":
-                                               $qpart = "cache_content = $cache_content";
-                                               break;
-
                                        case "cat_id":
                                                $qpart = $category_qpart_nocomma;
                                                break;
index dd40b9529f21aa94099e500c69ba7e634f16757a..f17828d1db2d441696391b5fd58e71f9ddfc280c 100644 (file)
                                }
                        }
 
-                       if ($cache_content && $line["cached_content"] != "") {
-                               $line["content"] =& $line["cached_content"];
-                       }
-
                        $rv['content'] .= $line["content"];
 
                        $rv['content'] .= format_article_enclosures($link, $id,
index feffe0019b8242478787717998fd3de1faaa766c..156be0b12236762a939cc78ee0c2f6d70612794a 100644 (file)
                }
        }
 
-       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'));