]>
Commit | Line | Data |
---|---|---|
1d3a17c7 | 1 | <?php |
88e8fb3a AD |
2 | set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR . |
3 | get_include_path()); | |
107d0cf3 | 4 | |
404e2e36 | 5 | require_once "autoload.php"; |
fb074239 | 6 | require_once "functions.php"; |
1559e374 | 7 | require_once "sessions.php"; |
66581886 | 8 | require_once "sanity_check.php"; |
9a4506c8 | 9 | require_once "config.php"; |
8158c57a | 10 | require_once "db.php"; |
a0111294 | 11 | require_once "db-prefs.php"; |
9a4506c8 | 12 | |
6322ac79 | 13 | if (!init_plugins()) return; |
4e9f5c24 | 14 | |
d75409bf | 15 | $op = $_REQUEST['op']; |
0a13e84e | 16 | |
442f326b | 17 | if ($op == "publish"){ |
a77a4733 AD |
18 | $key = $_REQUEST["key"]; |
19 | $pdo = Db::pdo(); | |
86e26f1a | 20 | |
a77a4733 | 21 | $sth = $pdo->prepare( "SELECT owner_uid |
2e7f046f | 22 | FROM ttrss_access_keys WHERE |
a77a4733 AD |
23 | access_key = ? AND feed_id = 'OPML:Publish'"); |
24 | $sth->execute([$key]); | |
86e26f1a | 25 | |
a77a4733 AD |
26 | if ($row = $sth->fetch()) { |
27 | $owner_uid = $row['owner_uid']; | |
e9558345 | 28 | |
1f294435 | 29 | $opml = new Opml($_REQUEST); |
d75409bf | 30 | $opml->opml_export("", $owner_uid, true, false); |
9f311df6 | 31 | |
d75409bf AD |
32 | } else { |
33 | print "<error>User not found</error>"; | |
c03cf250 | 34 | } |
9f311df6 AD |
35 | } |
36 | ||
9a4506c8 | 37 | ?> |