From fb54e3b1887ae2d365c139296ebb03dc523478f5 Mon Sep 17 00:00:00 2001
From: Andrew Dolgov
Date: Mon, 1 Apr 2013 10:47:41 +0400
Subject: [PATCH] remove xml stuff from backend/dlg
---
classes/dlg.php | 30 ++----------------------------
classes/feeds.php | 4 ++--
classes/pref/feeds.php | 4 ++--
js/functions.js | 16 +++++-----------
js/tt-rss.js | 6 +++---
5 files changed, 14 insertions(+), 46 deletions(-)
diff --git a/classes/dlg.php b/classes/dlg.php
index e0348950..d13a9ecb 100644
--- a/classes/dlg.php
+++ b/classes/dlg.php
@@ -4,21 +4,15 @@ class Dlg extends Handler_Protected {
function before($method) {
if (parent::before($method)) {
- header("Content-Type: text/xml; charset=utf-8");
+ header("Content-Type: text/html"); # required for iframe
+
$this->param = db_escape_string($this->link, $_REQUEST["param"]);
- print "";
return true;
}
return false;
}
- function after() {
- print "";
- }
-
function importOpml() {
- header("Content-Type: text/html"); # required for iframe
-
print __("If you have imported labels and/or filters, you might need to reload preferences to see your new data.") . "
";
print "";
@@ -165,9 +159,6 @@ class Dlg extends Handler_Protected {
}
function pubOPMLUrl() {
- print "
".__('Public OPML URL')."";
- print "link);
print __("Your Public OPML URL is:");
@@ -185,15 +176,11 @@ class Dlg extends Handler_Protected {
__('Close this window')."";
print "";
- print "]]>";
//return;
}
function explainError() {
- print "".__('Notice')."";
- print "";
if ($this->param == 1) {
@@ -222,7 +209,6 @@ class Dlg extends Handler_Protected {
__('Close this window')."";
print "";
- print "]]>";
//return;
}
@@ -442,9 +428,6 @@ class Dlg extends Handler_Protected {
}
function printTagCloud() {
- print "".__('Tag Cloud')."";
- print "";
// from here: http://www.roscripts.com/Create_tag_cloud-71.html
@@ -506,14 +489,10 @@ class Dlg extends Handler_Protected {
__('Close this window')."";
print "";
- print "]]>";
}
function printTagSelect() {
- print "" . __('Select item(s) by tags') . "";
- print "";
print "";
@@ -541,14 +520,10 @@ class Dlg extends Handler_Protected {
__('Close this window') . "";
print "";
- print "]]>";
}
function generatedFeed() {
- print "".__('View as RSS')."";
- print "params = explode(":", $this->param, 3);
$feed_id = db_escape_string($this->link, $this->params[0]);
$is_cat = (bool) $this->params[1];
@@ -572,7 +547,6 @@ class Dlg extends Handler_Protected {
__('Close this window')."";
print "";
- print "]]>";
//return;
}
diff --git a/classes/feeds.php b/classes/feeds.php
index 2826f175..a80ae4b3 100644
--- a/classes/feeds.php
+++ b/classes/feeds.php
@@ -81,7 +81,7 @@ class Feeds extends Handler_Protected {
$reply .= "
+ onclick=\"displayDlg('".__("View as RSS")."','generatedFeed', '$feed_id:$is_cat:$rss_link')\">
";
$reply .= "";
@@ -135,7 +135,7 @@ class Feeds extends Handler_Protected {
//$reply .= "";
- $reply .= "";
+ $reply .= "";
$reply .= "";
diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php
index 7895a039..1983987a 100644
--- a/classes/pref/feeds.php
+++ b/classes/pref/feeds.php
@@ -1399,7 +1399,7 @@ class Pref_Feeds extends Handler_Protected {
print __("Published OPML does not include your Tiny Tiny RSS settings, feeds that require authentication or feeds hidden from Popular feeds.") . "";
- print "