aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Web/Router.php22
1 files changed, 21 insertions, 1 deletions
diff --git a/Zotlabs/Web/Router.php b/Zotlabs/Web/Router.php
index 29f2b5206..699b27891 100644
--- a/Zotlabs/Web/Router.php
+++ b/Zotlabs/Web/Router.php
@@ -54,7 +54,17 @@ class Router {
*/
if(! (\App::$module_loaded)) {
- if(file_exists("mod/site/{$module}.php")) {
+ $newmod = ucfirst($module);
+logger('0' . "Zotlabs/Module/{$newmod}.php");
+ if(file_exists("Zotlabs/Module/{$newmod}.php")) {
+logger('1' . "Zotlabs/Module/{$newmod}.php");
+ include_once("Zotlabs/Module/{$newmod}.php");
+logger('2');
+ if(class_exists("Zotlabs\\Module\\{$newmod}"))
+ \App::$module_loaded = true;
+logger('3');
+ }
+ elseif(file_exists("mod/site/{$module}.php")) {
include_once("mod/site/{$module}.php");
\App::$module_loaded = true;
}
@@ -122,6 +132,12 @@ class Router {
* Call module functions
*/
+ $nmod = false;
+
+ $newmod = ucfirst(\App::$module);
+ if(class_exists("Zotlabs\\Module\\{$newmod}"))
+ $nmod = true;
+
if(\App::$module_loaded) {
\App::$page['page_title'] = \App::$module;
$placeholder = '';
@@ -133,6 +149,10 @@ class Router {
* to over-ride them.
*/
+ $modname = (($nmod) ? "Zotlabs\\Module\\{$newmod}" : '');
+ if($modname && method_exists($modname,'init'))
+ logger('function_exists: ' . $modname . '->init');
+
if(function_exists(\App::$module . '_init')) {
$arr = array('init' => true, 'replace' => false);
call_hooks(\App::$module . '_mod_init', $arr);