mirror of
https://git.tt-rss.org/fox/tt-rss.git
synced 2025-09-02 20:21:03 +02:00
last minute workaround for OPML import on MySQL
This commit is contained in:
parent
34c872f5d9
commit
b76cdb2f44
12
opml.php
12
opml.php
@ -43,16 +43,20 @@
|
|||||||
|
|
||||||
print "Feed <b>$title</b> ($url)... ";
|
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'");
|
title = '$title' OR feed_url = '$url'");
|
||||||
|
|
||||||
if (db_num_rows($result) > 0) {
|
if ($result && db_num_rows($result) > 0) {
|
||||||
|
|
||||||
print " Already imported.<br>";
|
print " Already imported.<br>";
|
||||||
|
|
||||||
} else {
|
} 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')");
|
('$title', '$url')");
|
||||||
|
|
||||||
print "<b>Done.</b><br>";
|
print "<b>Done.</b><br>";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user