1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 17:15:55 +00:00

remove published opml (use CLI instead)

This commit is contained in:
Andrew Dolgov
2021-03-16 12:27:46 +03:00
parent c134aa387d
commit 44b274b6d4
4 changed files with 0 additions and 107 deletions

View File

@@ -753,27 +753,6 @@ class Handler_Public extends Handler {
<?php
}
function publishOpml() {
$key = clean($_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("published.opml", $owner_uid, true, false);
} else {
header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
echo "File not found.";
}
}
function cached() {
list ($cache_dir, $filename) = explode("/", $_GET["file"], 2);

View File

@@ -633,12 +633,6 @@ class OPML extends Handler_Protected {
print "$msg<br/>";
}
static function get_publish_url(){
return Config::get_self_url() .
"/public.php?op=publishOpml&key=" .
Feeds::_get_access_key('OPML:Publish', false, $_SESSION["uid"]);
}
function get_feed_category($feed_cat, $parent_cat_id = false) {
$parent_cat_id = (int) $parent_cat_id;

View File

@@ -1012,17 +1012,6 @@ class Pref_Feeds extends Handler_Protected {
</label>
</form>
<hr/>
<h2><?= __("Published OPML") ?></h2>
<?= format_notice("Your OPML can be published and then subscribed by anyone who knows the URL below. This won't include your settings nor authenticated feeds.") ?>
<button dojoType='dijit.form.Button' class='alt-primary' onclick="return Helpers.OPML.publish()">
<?= \Controls\icon("share") ?>
<?= __('Display published OPML URL') ?>
</button>
<?php
PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_TAB_SECTION, "prefFeedsOPML");
}
@@ -1251,17 +1240,6 @@ class Pref_Feeds extends Handler_Protected {
return Feeds::_clear_access_keys($_SESSION['uid']);
}
function getOPMLKey() {
print json_encode(["link" => OPML::get_publish_url()]);
}
function regenOPMLKey() {
Feeds::_update_access_key('OPML:Publish',
false, $_SESSION["uid"]);
print json_encode(["link" => OPML::get_publish_url()]);
}
function regenFeedKey() {
$feed_id = clean($_REQUEST['id']);
$is_cat = clean($_REQUEST['is_cat']);