X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=opml.php;h=af3694051d16d64f3b4862c18202ba10e101c8cd;hb=c625a17ebb4366e2b51fffdaff1846098211989f;hp=709cfd4ccb79fbffc9e23ad10f14f243255d4e51;hpb=404e2e3603c852a3f82a21c14b8888005e2b3f99;p=tt-rss.git diff --git a/opml.php b/opml.php index 709cfd4c..af369405 100644 --- a/opml.php +++ b/opml.php @@ -10,23 +10,21 @@ require_once "db.php"; require_once "db-prefs.php"; - $link = db_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME); - - if (!init_plugins($link)) return; + if (!init_plugins()) return; $op = $_REQUEST['op']; if ($op == "publish"){ - $key = db_escape_string($link, $_REQUEST["key"]); + $key = db_escape_string( $_REQUEST["key"]); - $result = db_query($link, "SELECT owner_uid + $result = db_query( "SELECT owner_uid FROM ttrss_access_keys WHERE access_key = '$key' AND feed_id = 'OPML:Publish'"); if (db_num_rows($result) == 1) { $owner_uid = db_fetch_result($result, 0, "owner_uid"); - $opml = new Opml($link, $_REQUEST); + $opml = new Opml($_REQUEST); $opml->opml_export("", $owner_uid, true, false); } else { @@ -34,6 +32,4 @@ } } - db_close($link); - ?>