mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 03:15:56 +00:00
* implement shortcut syntax for exposed plugin methods
* move shared article rendering code to share plugin
This commit is contained in:
11
public.php
11
public.php
@@ -17,6 +17,17 @@
|
||||
|
||||
$method = (string)clean($_REQUEST["op"]);
|
||||
|
||||
// shortcut syntax for public (exposed) methods (?op=plugin--pmethod&...params)
|
||||
if (strpos($method, PluginHost::PUBLIC_METHOD_DELIMITER) !== false) {
|
||||
list ($plugin, $pmethod) = explode(PluginHost::PUBLIC_METHOD_DELIMITER, $method, 2);
|
||||
|
||||
// TODO: better implementation that won't modify $_REQUEST
|
||||
$_REQUEST["plugin"] = $plugin;
|
||||
$_REQUEST["pmethod"] = $pmethod;
|
||||
|
||||
$method = "pluginhandler";
|
||||
}
|
||||
|
||||
$override = PluginHost::getInstance()->lookup_handler("public", $method);
|
||||
|
||||
if ($override) {
|
||||
|
||||
Reference in New Issue
Block a user