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

move bookmarklet-related methods out of public.php into the plugin

This commit is contained in:
Andrew Dolgov
2021-02-19 20:21:36 +03:00
parent c9ccb0791d
commit fc0ebf0891
5 changed files with 336 additions and 328 deletions

View File

@@ -599,7 +599,7 @@ class PluginHost {
}
// handled by classes/pluginhandler.php, requires valid session
function get_method_url(Plugin $sender, string $method, $params) {
function get_method_url(Plugin $sender, string $method, $params = []) {
return get_self_url_prefix() . "/backend.php?" .
http_build_query(
array_merge(
@@ -623,7 +623,7 @@ class PluginHost {
} */
// WARNING: endpoint in public.php, exposed to unauthenticated users
function get_public_method_url(Plugin $sender, string $method, $params) {
function get_public_method_url(Plugin $sender, string $method, $params = []) {
if ($sender->is_public_method($method)) {
return get_self_url_prefix() . "/public.php?" .
http_build_query(