]> git.wh0rd.org - tt-rss.git/commitdiff
rssfuncs: remove unused variables
authorAndrew Dolgov <noreply@fakecake.org>
Wed, 19 Feb 2014 11:17:29 +0000 (15:17 +0400)
committerAndrew Dolgov <noreply@fakecake.org>
Wed, 19 Feb 2014 11:17:29 +0000 (15:17 +0400)
include/rssfuncs.php

index dc0d6b02da5f57a810ec34e93974b76f9be106f8..f9f9772e127e5fcc8c11d20dcf205fb4f9172bba 100644 (file)
                _debug("start", $debug_enabled);
 
                $result = db_query("SELECT id,update_interval,auth_login,
-                       feed_url,auth_pass,cache_images,last_updated,
+                       feed_url,auth_pass,cache_images,
                        mark_unread_on_update, owner_uid,
                        pubsub_state, auth_pass_encrypted,
                        (SELECT max(date_entered) FROM
                        return false;
                }
 
-               $last_updated = db_fetch_result($result, 0, "last_updated");
                $last_article_timestamp = @strtotime(db_fetch_result($result, 0, "last_article_timestamp"));
 
                if (defined('_DISABLE_HTTP_304'))
 
                        // cache data for later
                        if (!$auth_pass && !$auth_login && is_writable(CACHE_DIR . "/simplepie")) {
-                               $new_rss_hash = sha1($rss_data);
+                               $new_rss_hash = sha1($feed_data);
 
                                if ($new_rss_hash != $rss_hash && count($rss->get_items()) > 0 ) {
                                        _debug("saving $cache_filename", $debug_enabled);
 
                                        $rc = $s->subscribe($feed_self_url);
 
-                                       _debug("feed hub url found, subscribe request sent.", $debug_enabled);
+                                       _debug("feed hub url found, subscribe request sent. [rc=$rc]", $debug_enabled);
 
                                        db_query("UPDATE ttrss_feeds SET pubsub_state = 1
                                                WHERE id = '$feed'");
 
                                if ($entry_timestamp == -1 || !$entry_timestamp || $entry_timestamp > time()) {
                                        $entry_timestamp = time();
-                                       $no_orig_date = 'true';
-                               } else {
-                                       $no_orig_date = 'false';
                                }
 
                                $entry_timestamp_fmt = strftime("%Y/%m/%d %H:%M:%S", $entry_timestamp);
                                                        '$entry_timestamp_fmt',
                                                        '$entry_content',
                                                        '$content_hash',
-                                                       $no_orig_date,
+                                                       false,
                                                        NOW(),
                                                        '$date_feed_processed',
                                                        '$entry_comments',
                                // now it should exist, if not - bad luck then
 
                                $result = db_query("SELECT
-                                               id,content_hash,no_orig_date,title,plugin_data,guid,
-                                               ".SUBSTRING_FOR_DATE."(date_updated,1,19) as date_updated,
-                                               ".SUBSTRING_FOR_DATE."(updated,1,19) as updated,
+                                               id,content_hash,title,plugin_data,guid,
                                                num_comments
                                        FROM
                                                ttrss_entries
                                        $orig_content_hash = db_fetch_result($result, 0, "content_hash");
                                        $orig_title = db_fetch_result($result, 0, "title");
                                        $orig_num_comments = db_fetch_result($result, 0, "num_comments");
-                                       $orig_date_updated = strtotime(db_fetch_result($result,
-                                               0, "date_updated"));
                                        $orig_plugin_data = db_fetch_result($result, 0, "plugin_data");
 
                                        $ref_id = db_fetch_result($result, 0, "id");
 
                                                        $p = new Publisher(PUBSUBHUBBUB_HUB);
 
-                                                       $pubsub_result = $p->publish_update($rss_link);
+                                                       /* $pubsub_result = */ $p->publish_update($rss_link);
                                                }
 
                                                $result = db_query(
        }
 
        function cache_images($html, $site_url, $debug) {
-               $cache_dir = CACHE_DIR . "/images";
-
                libxml_use_internal_errors(true);
 
                $charset_hack = '<head>