summaryrefslogtreecommitdiff
path: root/opml.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2005-09-02 12:57:08 +0100
committerAndrew Dolgov <[email protected]>2005-09-02 12:57:08 +0100
commiteac7480c09689647e2f1cd0c1b4f9304bd217aa3 (patch)
tree080c6f14465c5d62674d37fa223f29071d1b2f6b /opml.php
parent8599e26a6ec71c6c88e750df3ad0c341afc11998 (diff)
disable OPML import in demo mode, fix printing of processing instruction
Diffstat (limited to 'opml.php')
-rw-r--r--opml.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/opml.php b/opml.php
index f29b19023..c17821130 100644
--- a/opml.php
+++ b/opml.php
@@ -4,6 +4,7 @@
$op = $_REQUEST["op"];
if ($op == "Export") {
header("Content-type: application/xml");
+ print "<?xml version=\"1.0\"?>";
}
require_once "config.php";
@@ -14,7 +15,6 @@
pg_query($link, "set client_encoding = 'utf-8'");
if ($op == "Export") {
- print "<?xml version=\"1.0\"?>";
print "<opml version=\"1.0\">";
print "<head><dateCreated>" . date("r", time()) . "</dateCreated></head>";
print "<body>";
@@ -63,6 +63,7 @@
}
if ($op == "Import") {
+
print "<html>
<head>
<link rel=\"stylesheet\" href=\"opml.css\" type=\"text/css\">
@@ -70,7 +71,15 @@
<body><h1>Importing OPML...</h1>
<div>";
- if (is_file($_FILES['opml_file']['tmp_name'])) {
+ if (WEB_DEMO_MODE) {
+ print "OPML import is disabled in demo-mode.";
+ print "<p><a class=\"button\" href=\"prefs.php\">
+ Return to preferences</a></div></body></html>";
+
+ return;
+ }
+
+ if (is_file($_FILES['opml_file']['tmp_name'])) {
$xml_parser = xml_parser_create();