From 964e461e092b15a66da891a0a4c155323e8391e1 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 15 Jul 2015 21:01:18 -0700 Subject: allow plugins to provide module handlers for arbitrary modules that haven't been installed on the system. --- index.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'index.php') diff --git a/index.php b/index.php index 3c2f172f5..9452bd05b 100755 --- a/index.php +++ b/index.php @@ -199,6 +199,17 @@ if(strlen($a->module)) { } } + /** + * This provides a place for plugins to register module handlers which don't otherwise exist on the system. + * If the plugin sets 'installed' to true we won't throw a 404 error for the specified module even if + * there is no specific module file or matching plugin name. + * The plugin should catch at least one of the module hooks for this URL. + */ + + $x = array('module' => $a->module, 'installed' => false); + call_hooks('module_loaded', $x); + if($x['installed']) + $a->module_loaded = true; /** * The URL provided does not resolve to a valid module. -- cgit v1.2.3