aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Module/Siteinfo.php7
-rw-r--r--Zotlabs/Module/Siteinfo_json.php14
-rwxr-xr-xboot.php5
3 files changed, 8 insertions, 18 deletions
diff --git a/Zotlabs/Module/Siteinfo.php b/Zotlabs/Module/Siteinfo.php
index 7c3918425..fafd51f65 100644
--- a/Zotlabs/Module/Siteinfo.php
+++ b/Zotlabs/Module/Siteinfo.php
@@ -5,14 +5,13 @@ namespace Zotlabs\Module;
class Siteinfo extends \Zotlabs\Web\Controller {
function init() {
- if (argv(1) === 'json') {
+logger(print_r($_REQUEST,true));
+ if (argv(1) === 'json' || $_REQUEST['module_format'] === 'json') {
$data = get_site_info();
json_return_and_die($data);
}
}
-
-
-
+
function get() {
$siteinfo = replace_macros(get_markup_template('siteinfo.tpl'),
diff --git a/Zotlabs/Module/Siteinfo_json.php b/Zotlabs/Module/Siteinfo_json.php
deleted file mode 100644
index 99c22610f..000000000
--- a/Zotlabs/Module/Siteinfo_json.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php
-namespace Zotlabs\Module;
-
-
-class Siteinfo_json extends \Zotlabs\Web\Controller {
-
- function init() {
-
- $data = get_site_info();
- json_return_and_die($data);
-
- }
-
-}
diff --git a/boot.php b/boot.php
index 171382e0c..03c59b8e3 100755
--- a/boot.php
+++ b/boot.php
@@ -899,6 +899,11 @@ class App {
self::$argv = explode('/', self::$cmd);
self::$argc = count(self::$argv);
if ((array_key_exists('0', self::$argv)) && strlen(self::$argv[0])) {
+ if(strpos(self::$argv[0],'.')) {
+ $_REQUEST['module_format'] = substr(self::$argv[0],strpos(self::$argv[0],'.')+1);
+ self::$argv[0] = substr(self::$argv[0],0,strpos(self::$argv[0],'.'));
+ }
+
self::$module = str_replace(".", "_", self::$argv[0]);
self::$module = str_replace("-", "_", self::$module);
if(strpos(self::$module,'_') === 0)