From: Andrew Dolgov Date: Fri, 2 Sep 2005 11:57:08 +0000 (+0100) Subject: disable OPML import in demo mode, fix printing of processing instruction X-Git-Tag: 1.0.3~69 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=eac7480c09689647e2f1cd0c1b4f9304bd217aa3;p=tt-rss.git disable OPML import in demo mode, fix printing of processing instruction --- diff --git a/opml.php b/opml.php index f29b1902..c1782113 100644 --- a/opml.php +++ b/opml.php @@ -4,6 +4,7 @@ $op = $_REQUEST["op"]; if ($op == "Export") { header("Content-type: application/xml"); + print ""; } require_once "config.php"; @@ -14,7 +15,6 @@ pg_query($link, "set client_encoding = 'utf-8'"); if ($op == "Export") { - print ""; print ""; print "" . date("r", time()) . ""; print ""; @@ -63,6 +63,7 @@ } if ($op == "Import") { + print " @@ -70,7 +71,15 @@

Importing OPML...

"; - if (is_file($_FILES['opml_file']['tmp_name'])) { + if (WEB_DEMO_MODE) { + print "OPML import is disabled in demo-mode."; + print "

+ Return to preferences

"; + + return; + } + + if (is_file($_FILES['opml_file']['tmp_name'])) { $xml_parser = xml_parser_create();