]>
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"){ |
6322ac79 | 18 | $key = db_escape_string( $_REQUEST["key"]); |
86e26f1a | 19 | |
6322ac79 | 20 | $result = db_query( "SELECT owner_uid |
2e7f046f AD |
21 | FROM ttrss_access_keys WHERE |
22 | access_key = '$key' AND feed_id = 'OPML:Publish'"); | |
86e26f1a MK |
23 | |
24 | if (db_num_rows($result) == 1) { | |
2e7f046f | 25 | $owner_uid = db_fetch_result($result, 0, "owner_uid"); |
e9558345 | 26 | |
1f294435 | 27 | $opml = new Opml($_REQUEST); |
d75409bf | 28 | $opml->opml_export("", $owner_uid, true, false); |
9f311df6 | 29 | |
d75409bf AD |
30 | } else { |
31 | print "<error>User not found</error>"; | |
c03cf250 | 32 | } |
9f311df6 AD |
33 | } |
34 | ||
9a4506c8 | 35 | ?> |