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

implement plugin routing masks, add example plugin

This commit is contained in:
Andrew Dolgov
2012-12-23 23:05:51 +04:00
parent 5cedb389d2
commit 8dcb2b4762
7 changed files with 108 additions and 7 deletions

View File

@@ -40,9 +40,16 @@
$method = $_REQUEST["op"];
$handler = new Handler_Public($link, $_REQUEST);
global $pluginhost;
$override = $pluginhost->lookup_handler("public", $method);
if ($handler->before($method)) {
if ($override) {
$handler = $override;
} else {
$handler = new Handler_Public($link, $_REQUEST);
}
if (implements_interface($handler, "IHandler") && $handler->before($method)) {
if ($method && method_exists($handler, $method)) {
$handler->$method();
} else if (method_exists($handler, 'index')) {