summaryrefslogtreecommitdiff
path: root/public.php
diff options
context:
space:
mode:
Diffstat (limited to 'public.php')
-rw-r--r--public.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/public.php b/public.php
index 59b5a499c..fadb2f14d 100644
--- a/public.php
+++ b/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) {