From a491a7f10343b98043f07651e3a254fa8a975640 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 29 Dec 2009 22:38:22 +0300 Subject: [PATCH] view: do not pass feed_id --- backend.php | 2 -- offline.js | 8 ++++---- viewfeed.js | 18 ++++++------------ 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/backend.php b/backend.php index f6e7acc79..e1cc82a12 100644 --- a/backend.php +++ b/backend.php @@ -222,8 +222,6 @@ // in prefetch mode we only output requested cids, main article // just gets marked as read (it already exists in client cache) - $feed_id = false; - if ($mode == "") { outputArticleXML($link, $id, false); } else if ($mode == "zoom") { diff --git a/offline.js b/offline.js index 2650515f1..ca2ae0990 100644 --- a/offline.js +++ b/offline.js @@ -8,7 +8,7 @@ var articles_synced = 0; var sync_in_progress = false; var sync_timer = false; -function view_offline(id, feed_id) { +function view_offline(id) { try { enableHotkeys(); @@ -337,12 +337,12 @@ function viewfeed_offline(feed_id, subop, is_cat, subop_param, skip_history, off tmp += ""+marked_pic+""; - tmp += ""; tmp += ""+ + "onclick=\"return view("+id+");\">"+ rs.fieldByName("title"); tmp += " - "+content_preview+""; @@ -359,7 +359,7 @@ function viewfeed_offline(feed_id, subop, is_cat, subop_param, skip_history, off tmp += ""; - tmp += ""+ + tmp += ""+ ""+rs.fieldByName("updated").substring(0,16)+ ""; diff --git a/viewfeed.js b/viewfeed.js index d0c325d2d..99bab234e 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -363,7 +363,7 @@ function showArticleInHeadlines(id) { } } -function article_callback2(transport, id, feed_id) { +function article_callback2(transport, id) { try { debug("article_callback2 " + id); @@ -392,7 +392,6 @@ function article_callback2(transport, id, feed_id) { return; } - active_real_feed_id = feed_id; active_post_id = id; debug("looking for articles to cache..."); @@ -457,13 +456,11 @@ function article_callback2(transport, id, feed_id) { } } -function view(id, feed_id) { +function view(id) { try { - if (!feed_id) feed_id = 0; + debug("loading article: " + id); - debug("loading article: " + id + "/" + feed_id); - - if (offline_mode) return view_offline(id, feed_id); + if (offline_mode) return view_offline(id); var cached_article = cache_find(id); @@ -472,10 +469,7 @@ function view(id, feed_id) { enableHotkeys(); hideAuxDlg(); - //setActiveFeedId(feed_id); - - var query = "?op=view&id=" + param_escape(id) + - "&feed=" + param_escape(feed_id); + var query = "?op=view&id=" + param_escape(id); var date = new Date(); @@ -559,7 +553,7 @@ function view(id, feed_id) { new Ajax.Request("backend.php", { parameters: query, onComplete: function(transport) { - article_callback2(transport, id, feed_id); + article_callback2(transport, id); } }); return false;