view: do not pass feed_id

This commit is contained in:
Andrew Dolgov 2009-12-29 22:38:22 +03:00
parent d94475164e
commit a491a7f103
3 changed files with 10 additions and 18 deletions

View file

@ -222,8 +222,6 @@
// in prefetch mode we only output requested cids, main article // in prefetch mode we only output requested cids, main article
// just gets marked as read (it already exists in client cache) // just gets marked as read (it already exists in client cache)
$feed_id = false;
if ($mode == "") { if ($mode == "") {
outputArticleXML($link, $id, false); outputArticleXML($link, $id, false);
} else if ($mode == "zoom") { } else if ($mode == "zoom") {

View file

@ -8,7 +8,7 @@ var articles_synced = 0;
var sync_in_progress = false; var sync_in_progress = false;
var sync_timer = false; var sync_timer = false;
function view_offline(id, feed_id) { function view_offline(id) {
try { try {
enableHotkeys(); enableHotkeys();
@ -337,12 +337,12 @@ function viewfeed_offline(feed_id, subop, is_cat, subop_param, skip_history, off
tmp += "<td class='hlMarkedPic'>"+marked_pic+"</td>"; tmp += "<td class='hlMarkedPic'>"+marked_pic+"</td>";
tmp += "<td onclick='view("+id+","+feed_id+")' "+ tmp += "<td onclick='view("+id+")' "+
"class='hlContent' valign='middle'>"; "class='hlContent' valign='middle'>";
tmp += "<a target=\"_blank\" id=\"RTITLE-"+id+"\" href=\"" + tmp += "<a target=\"_blank\" id=\"RTITLE-"+id+"\" href=\"" +
rs.fieldByName("link") + "\"" + rs.fieldByName("link") + "\"" +
"onclick=\"return view("+id+","+feed_id+");\">"+ "onclick=\"return view("+id+");\">"+
rs.fieldByName("title"); rs.fieldByName("title");
tmp += "<span class=\"contentPreview\"> - "+content_preview+"</span>"; tmp += "<span class=\"contentPreview\"> - "+content_preview+"</span>";
@ -359,7 +359,7 @@ function viewfeed_offline(feed_id, subop, is_cat, subop_param, skip_history, off
tmp += "</td>"; tmp += "</td>";
tmp += "<td class=\"hlUpdated\" onclick='view("+id+","+feed_id+")'>"+ tmp += "<td class=\"hlUpdated\" onclick='view("+id+")'>"+
"<nobr>"+rs.fieldByName("updated").substring(0,16)+ "<nobr>"+rs.fieldByName("updated").substring(0,16)+
"</nobr></td>"; "</nobr></td>";

View file

@ -363,7 +363,7 @@ function showArticleInHeadlines(id) {
} }
} }
function article_callback2(transport, id, feed_id) { function article_callback2(transport, id) {
try { try {
debug("article_callback2 " + id); debug("article_callback2 " + id);
@ -392,7 +392,6 @@ function article_callback2(transport, id, feed_id) {
return; return;
} }
active_real_feed_id = feed_id;
active_post_id = id; active_post_id = id;
debug("looking for articles to cache..."); 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 { try {
if (!feed_id) feed_id = 0; debug("loading article: " + id);
debug("loading article: " + id + "/" + feed_id); if (offline_mode) return view_offline(id);
if (offline_mode) return view_offline(id, feed_id);
var cached_article = cache_find(id); var cached_article = cache_find(id);
@ -472,10 +469,7 @@ function view(id, feed_id) {
enableHotkeys(); enableHotkeys();
hideAuxDlg(); hideAuxDlg();
//setActiveFeedId(feed_id); var query = "?op=view&id=" + param_escape(id);
var query = "?op=view&id=" + param_escape(id) +
"&feed=" + param_escape(feed_id);
var date = new Date(); var date = new Date();
@ -559,7 +553,7 @@ function view(id, feed_id) {
new Ajax.Request("backend.php", { new Ajax.Request("backend.php", {
parameters: query, parameters: query,
onComplete: function(transport) { onComplete: function(transport) {
article_callback2(transport, id, feed_id); article_callback2(transport, id);
} }); } });
return false; return false;