summaryrefslogtreecommitdiff
path: root/opml.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2005-09-07 15:27:54 +0100
committerAndrew Dolgov <[email protected]>2005-09-07 15:27:54 +0100
commitb76cdb2f44755f299d94b4dba788f55d86170bc7 (patch)
tree688bd90b8f8f728c6ed3ae326bdb0da88a245509 /opml.php
parent34c872f5d96866b70f1ab4a16e8e76cd02b0d707 (diff)
last minute workaround for OPML import on MySQL
Diffstat (limited to 'opml.php')
-rw-r--r--opml.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/opml.php b/opml.php
index d932d8bd9..67ed91397 100644
--- a/opml.php
+++ b/opml.php
@@ -43,16 +43,20 @@
print "Feed <b>$title</b> ($url)... ";
- $result = db_query_2("SELECT id FROM ttrss_feeds WHERE
+ if (DB_TYPE == "mysql") {
+ $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME);
+ }
+
+ $result = db_query($link, "SELECT id FROM ttrss_feeds WHERE
title = '$title' OR feed_url = '$url'");
- if (db_num_rows($result) > 0) {
+ if ($result && db_num_rows($result) > 0) {
print " Already imported.<br>";
} else {
-
- $result = db_query_2("INSERT INTO ttrss_feeds (title, feed_url) VALUES
+
+ $result = db_query($link, "INSERT INTO ttrss_feeds (title, feed_url) VALUES
('$title', '$url')");
print "<b>Done.</b><br>";