From e98a3f6525a570913d1f957c12773cd1f1047aca Mon Sep 17 00:00:00 2001
From: Andrew Dolgov
Date: Fri, 25 Nov 2005 14:27:56 +0100
Subject: [PATCH] OPML import support for categories (rewritten using domxml)
---
opml.php | 149 +++++++++++++++++++++++++++++--------------------------
1 file changed, 80 insertions(+), 69 deletions(-)
diff --git a/opml.php b/opml.php
index 89634025..9f76797b 100644
--- a/opml.php
+++ b/opml.php
@@ -15,7 +15,7 @@
require_once "db.php";
require_once "db-prefs.php";
-// $_SESSION["uid"] = PLACEHOLDER_UID; // FIXME: placeholder
+ $owner_uid = $_SESSION["uid"];
$link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
@@ -75,109 +75,120 @@
print "
Importing OPML...
+ ";
- $title = $attrs["TEXT"];
- $url = $attrs["XMLURL"];
+ if (WEB_DEMO_MODE) {
+ print "OPML import is disabled in demo-mode.";
+ print "
+ Return to preferences
";
}
- function startElement($parser, $name, $attrs) {
+ if ($op == "Import") {
- if ($name == "OUTLINE") {
- if ($name == "OUTLINE") {
+ print "
+