rssfuncs: remove unused variables

This commit is contained in:
Andrew Dolgov 2014-02-19 15:17:29 +04:00
parent 901dd67a1a
commit 5ba1ddd409
1 changed files with 6 additions and 16 deletions

View File

@ -208,7 +208,7 @@
_debug("start", $debug_enabled); _debug("start", $debug_enabled);
$result = db_query("SELECT id,update_interval,auth_login, $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, mark_unread_on_update, owner_uid,
pubsub_state, auth_pass_encrypted, pubsub_state, auth_pass_encrypted,
(SELECT max(date_entered) FROM (SELECT max(date_entered) FROM
@ -220,7 +220,6 @@
return false; return false;
} }
$last_updated = db_fetch_result($result, 0, "last_updated");
$last_article_timestamp = @strtotime(db_fetch_result($result, 0, "last_article_timestamp")); $last_article_timestamp = @strtotime(db_fetch_result($result, 0, "last_article_timestamp"));
if (defined('_DISABLE_HTTP_304')) if (defined('_DISABLE_HTTP_304'))
@ -383,7 +382,7 @@
// cache data for later // cache data for later
if (!$auth_pass && !$auth_login && is_writable(CACHE_DIR . "/simplepie")) { 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 ) { if ($new_rss_hash != $rss_hash && count($rss->get_items()) > 0 ) {
_debug("saving $cache_filename", $debug_enabled); _debug("saving $cache_filename", $debug_enabled);
@ -534,7 +533,7 @@
$rc = $s->subscribe($feed_self_url); $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 db_query("UPDATE ttrss_feeds SET pubsub_state = 1
WHERE id = '$feed'"); WHERE id = '$feed'");
@ -570,9 +569,6 @@
if ($entry_timestamp == -1 || !$entry_timestamp || $entry_timestamp > time()) { if ($entry_timestamp == -1 || !$entry_timestamp || $entry_timestamp > time()) {
$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 = strftime("%Y/%m/%d %H:%M:%S", $entry_timestamp);
@ -742,7 +738,7 @@
'$entry_timestamp_fmt', '$entry_timestamp_fmt',
'$entry_content', '$entry_content',
'$content_hash', '$content_hash',
$no_orig_date, false,
NOW(), NOW(),
'$date_feed_processed', '$date_feed_processed',
'$entry_comments', '$entry_comments',
@ -770,9 +766,7 @@
// now it should exist, if not - bad luck then // now it should exist, if not - bad luck then
$result = db_query("SELECT $result = db_query("SELECT
id,content_hash,no_orig_date,title,plugin_data,guid, id,content_hash,title,plugin_data,guid,
".SUBSTRING_FOR_DATE."(date_updated,1,19) as date_updated,
".SUBSTRING_FOR_DATE."(updated,1,19) as updated,
num_comments num_comments
FROM FROM
ttrss_entries ttrss_entries
@ -789,8 +783,6 @@
$orig_content_hash = db_fetch_result($result, 0, "content_hash"); $orig_content_hash = db_fetch_result($result, 0, "content_hash");
$orig_title = db_fetch_result($result, 0, "title"); $orig_title = db_fetch_result($result, 0, "title");
$orig_num_comments = db_fetch_result($result, 0, "num_comments"); $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"); $orig_plugin_data = db_fetch_result($result, 0, "plugin_data");
$ref_id = db_fetch_result($result, 0, "id"); $ref_id = db_fetch_result($result, 0, "id");
@ -906,7 +898,7 @@
$p = new Publisher(PUBSUBHUBBUB_HUB); $p = new Publisher(PUBSUBHUBBUB_HUB);
$pubsub_result = $p->publish_update($rss_link); /* $pubsub_result = */ $p->publish_update($rss_link);
} }
$result = db_query( $result = db_query(
@ -1156,8 +1148,6 @@
} }
function cache_images($html, $site_url, $debug) { function cache_images($html, $site_url, $debug) {
$cache_dir = CACHE_DIR . "/images";
libxml_use_internal_errors(true); libxml_use_internal_errors(true);
$charset_hack = '<head> $charset_hack = '<head>