diff options
author | Andrew Dolgov <[email protected]> | 2021-02-21 15:16:39 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-02-21 15:16:39 +0300 |
commit | d1328321bebadcf8a530d3c05f52a8f3c58bb969 (patch) | |
tree | 8340f32be6292375fa32c1332bab128d35ac5564 /opml.php | |
parent | 2843b9917133e5ed8e1adf4ffd12356459fc16e4 (diff) |
move published OPML endpoint to public.php
Diffstat (limited to 'opml.php')
-rw-r--r-- | opml.php | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/opml.php b/opml.php deleted file mode 100644 index 6f13a6f3c..000000000 --- a/opml.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php - set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR . - get_include_path()); - - require_once "autoload.php"; - require_once "functions.php"; - require_once "sessions.php"; - require_once "sanity_check.php"; - require_once "config.php"; - require_once "db-prefs.php"; - - if (!init_plugins()) return; - - $op = $_REQUEST['op']; - - if ($op == "publish"){ - $key = $_REQUEST["key"]; - $pdo = Db::pdo(); - - $sth = $pdo->prepare( "SELECT owner_uid - FROM ttrss_access_keys WHERE - access_key = ? AND feed_id = 'OPML:Publish'"); - $sth->execute([$key]); - - if ($row = $sth->fetch()) { - $owner_uid = $row['owner_uid']; - - $opml = new OPML($_REQUEST); - $opml->opml_export("", $owner_uid, true, false); - - } else { - print "<error>User not found</error>"; - } - } - -?> |