From f217a557b84129a9f2ad692069d40e7fe341cdc6 Mon Sep 17 00:00:00 2001 From: Friendika Date: Thu, 10 Feb 2011 16:17:21 -0800 Subject: allow plugins to become cmd modules --- index.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 5f128ebb1..d0de1b9dc 100644 --- a/index.php +++ b/index.php @@ -134,7 +134,12 @@ else if(strlen($a->module)) { - if(file_exists("mod/{$a->module}.php")) { + if(is_array($a->plugins) && in_array($a->module,$a->plugins) && file_exists("addon/{$a->module}/{$a->module}.php")) { + include("addon/{$a->module}/{$a->module}.php"); + if(function_exists($a->module . '_module')) + $a->module_loaded = true; + } + if((! $a->module_loaded) && (file_exists("mod/{$a->module}.php"))) { include("mod/{$a->module}.php"); $a->module_loaded = true; } -- cgit v1.2.3 From fc5a3cac14d40286f0daf909b0243725a8ef76e3 Mon Sep 17 00:00:00 2001 From: Friendika Date: Thu, 10 Feb 2011 21:25:24 -0800 Subject: post to FB is working --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index d0de1b9dc..661676bfd 100644 --- a/index.php +++ b/index.php @@ -143,7 +143,7 @@ if(strlen($a->module)) { include("mod/{$a->module}.php"); $a->module_loaded = true; } - else { + if(! $a->module_loaded) { if((x($_SERVER,'QUERY_STRING')) && ($_SERVER['QUERY_STRING'] === 'q=internal_error.html') && isset($dreamhost_error_hack)) { logger('index.php: dreamhost_error_hack invoked. Original URI =' . $_SERVER['REQUEST_URI']); goaway($a->get_baseurl() . $_SERVER['REQUEST_URI']); -- cgit v1.2.3