workaround for Opera cache of feeds/headlines panel; remove addheader param handling
This commit is contained in:
parent
362698addb
commit
59b8192f94
13
backend.php
13
backend.php
|
@ -1,7 +1,7 @@
|
||||||
<?
|
<?
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
header("Cache-Control: no-cache");
|
header("Cache-Control: no-cache, must-revalidate");
|
||||||
header("Pragma: no-cache");
|
header("Pragma: no-cache");
|
||||||
header("Expires: -1");
|
header("Expires: -1");
|
||||||
|
|
||||||
|
@ -898,8 +898,6 @@
|
||||||
SET unread = false,last_read = NOW()
|
SET unread = false,last_read = NOW()
|
||||||
WHERE ref_id = '$id' AND feed_id = '$feed_id' AND owner_uid = " . $_SESSION["uid"]);
|
WHERE ref_id = '$id' AND feed_id = '$feed_id' AND owner_uid = " . $_SESSION["uid"]);
|
||||||
|
|
||||||
$addheader = $_GET["addheader"];
|
|
||||||
|
|
||||||
$result = db_query($link, "SELECT title,link,content,feed_id,comments,int_id,
|
$result = db_query($link, "SELECT title,link,content,feed_id,comments,int_id,
|
||||||
SUBSTRING(updated,1,16) as updated,
|
SUBSTRING(updated,1,16) as updated,
|
||||||
(SELECT icon_url FROM ttrss_feeds WHERE id = feed_id) as icon_url,
|
(SELECT icon_url FROM ttrss_feeds WHERE id = feed_id) as icon_url,
|
||||||
|
@ -908,7 +906,6 @@
|
||||||
FROM ttrss_entries,ttrss_user_entries
|
FROM ttrss_entries,ttrss_user_entries
|
||||||
WHERE id = '$id' AND ref_id = id");
|
WHERE id = '$id' AND ref_id = id");
|
||||||
|
|
||||||
if ($addheader) {
|
|
||||||
print "<html><head>
|
print "<html><head>
|
||||||
<title>Tiny Tiny RSS : Article $id</title>
|
<title>Tiny Tiny RSS : Article $id</title>
|
||||||
<link rel=\"stylesheet\" href=\"tt-rss.css\" type=\"text/css\">";
|
<link rel=\"stylesheet\" href=\"tt-rss.css\" type=\"text/css\">";
|
||||||
|
@ -930,7 +927,6 @@
|
||||||
print "<script type=\"text/javascript\" src=\"functions.js\"></script>
|
print "<script type=\"text/javascript\" src=\"functions.js\"></script>
|
||||||
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
|
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
|
||||||
</head><body>";
|
</head><body>";
|
||||||
}
|
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
|
|
||||||
|
@ -1035,10 +1031,8 @@
|
||||||
</script>";
|
</script>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($addheader) {
|
|
||||||
print "</body></html>";
|
print "</body></html>";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ($op == "viewfeed") {
|
if ($op == "viewfeed") {
|
||||||
|
|
||||||
|
@ -1046,7 +1040,6 @@
|
||||||
$skip = $_GET["skip"];
|
$skip = $_GET["skip"];
|
||||||
$subop = $_GET["subop"];
|
$subop = $_GET["subop"];
|
||||||
$view_mode = $_GET["view"];
|
$view_mode = $_GET["view"];
|
||||||
$addheader = $_GET["addheader"];
|
|
||||||
$limit = $_GET["limit"];
|
$limit = $_GET["limit"];
|
||||||
|
|
||||||
if (!$feed) {
|
if (!$feed) {
|
||||||
|
@ -1057,7 +1050,6 @@
|
||||||
|
|
||||||
if ($subop == "undefined") $subop = "";
|
if ($subop == "undefined") $subop = "";
|
||||||
|
|
||||||
if ($addheader) {
|
|
||||||
print "<html><head>
|
print "<html><head>
|
||||||
<title>Tiny Tiny RSS : Feed $feed</title>
|
<title>Tiny Tiny RSS : Feed $feed</title>
|
||||||
<link rel=\"stylesheet\" href=\"tt-rss.css\" type=\"text/css\">";
|
<link rel=\"stylesheet\" href=\"tt-rss.css\" type=\"text/css\">";
|
||||||
|
@ -1091,7 +1083,6 @@
|
||||||
}
|
}
|
||||||
window.onload = init;
|
window.onload = init;
|
||||||
</script>";
|
</script>";
|
||||||
}
|
|
||||||
|
|
||||||
if ($subop == "ForceUpdate" && sprintf("%d", $feed) > 0) {
|
if ($subop == "ForceUpdate" && sprintf("%d", $feed) > 0) {
|
||||||
|
|
||||||
|
@ -1651,10 +1642,8 @@
|
||||||
}
|
}
|
||||||
</script>';
|
</script>';
|
||||||
|
|
||||||
if ($addheader) {
|
|
||||||
print "</body></html>";
|
print "</body></html>";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ($op == "pref-rpc") {
|
if ($op == "pref-rpc") {
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,13 @@ function viewfeed(feed, skip, subop, doc) {
|
||||||
|
|
||||||
// alert(headlines_frame)
|
// alert(headlines_frame)
|
||||||
|
|
||||||
headlines_frame.location.href = query + "&addheader=true";
|
if (navigator.userAgent.match("Opera")) {
|
||||||
|
var date = new Date();
|
||||||
|
var timestamp = Math.round(date.getTime() / 1000);
|
||||||
|
query = query + "&ts=" + timestamp
|
||||||
|
}
|
||||||
|
|
||||||
|
headlines_frame.location.href = query;
|
||||||
|
|
||||||
cleanSelectedList("feedList");
|
cleanSelectedList("feedList");
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
alter table ttrss_entries add column author varchar(250);
|
alter table ttrss_entries add column author varchar(250);
|
||||||
|
|
||||||
update ttrss_entries set author = ;;;
|
update ttrss_entries set author = '';
|
||||||
|
|
||||||
alter table ttrss_entries change author author varchar(250) not null;
|
alter table ttrss_entries change author author varchar(250) not null;
|
||||||
alter table ttrss_entries alter column author set default '';
|
alter table ttrss_entries alter column author set default '';
|
||||||
|
|
|
@ -225,6 +225,12 @@ function updateFeedList(silent, fetch) {
|
||||||
query_str = query_str + "&actid=" + getActiveFeedId();
|
query_str = query_str + "&actid=" + getActiveFeedId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (navigator.userAgent.match("Opera")) {
|
||||||
|
var date = new Date();
|
||||||
|
var timestamp = Math.round(date.getTime() / 1000);
|
||||||
|
query_str = query_str + "&ts=" + timestamp
|
||||||
|
}
|
||||||
|
|
||||||
if (fetch) query_str = query_str + "&fetch=yes";
|
if (fetch) query_str = query_str + "&fetch=yes";
|
||||||
|
|
||||||
var feeds_frame = document.getElementById("feeds-frame");
|
var feeds_frame = document.getElementById("feeds-frame");
|
||||||
|
|
|
@ -70,7 +70,7 @@ function view(id, feed_id) {
|
||||||
var content = m_document.getElementById("content-frame");
|
var content = m_document.getElementById("content-frame");
|
||||||
|
|
||||||
if (content) {
|
if (content) {
|
||||||
content.src = "backend.php?op=view&addheader=true&id=" + param_escape(id) +
|
content.src = "backend.php?op=view&id=" + param_escape(id) +
|
||||||
"&feed=" + param_escape(feed_id);
|
"&feed=" + param_escape(feed_id);
|
||||||
markHeadline(active_post_id);
|
markHeadline(active_post_id);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue