move bookmarklet-related subscribe_to_feed_url to bookmarklet plugin

This commit is contained in:
Andrew Dolgov 2021-02-15 16:41:52 +03:00
parent cfad740c99
commit bd3c38de84
2 changed files with 7 additions and 7 deletions

View File

@ -1655,10 +1655,4 @@ class Pref_Feeds extends Handler_Protected {
return $c; return $c;
} }
static function subscribe_to_feed_url() {
$url_path = get_self_url_prefix() .
"/public.php?op=subscribe&feed_url=%s";
return $url_path;
}
} }

View File

@ -16,6 +16,12 @@ class Bookmarklets extends Plugin {
$host->add_hook($host::HOOK_PREFS_TAB, $this); $host->add_hook($host::HOOK_PREFS_TAB, $this);
} }
private function subscribe_to_feed_url() {
$url_path = get_self_url_prefix() .
"/public.php?op=subscribe&feed_url=%s";
return $url_path;
}
function hook_prefs_tab($args) { function hook_prefs_tab($args) {
if ($args == "prefFeeds") { if ($args == "prefFeeds") {
@ -24,7 +30,7 @@ class Bookmarklets extends Plugin {
print "<h3>" . __("Drag the link below to your browser toolbar, open the feed you're interested in in your browser and click on the link to subscribe to it.") . "</h3>"; print "<h3>" . __("Drag the link below to your browser toolbar, open the feed you're interested in in your browser and click on the link to subscribe to it.") . "</h3>";
$bm_subscribe_url = str_replace('%s', '', Pref_Feeds::subscribe_to_feed_url()); $bm_subscribe_url = str_replace('%s', '', $this->subscribe_to_feed_url());
$confirm_str = str_replace("'", "\'", __('Subscribe to %s in Tiny Tiny RSS?')); $confirm_str = str_replace("'", "\'", __('Subscribe to %s in Tiny Tiny RSS?'));