diff options
author | zotlabs <mike@macgirvin.com> | 2017-07-13 20:53:05 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-07-13 20:53:05 -0700 |
commit | 266dab1b593a93d49ad97ab0cad9022486ba4c7f (patch) | |
tree | d3f77e73b717ab1bbda2c3a9adc626f519443c48 /Zotlabs/Module | |
parent | 2d119c81a44691773bacd9e545ce49bebd522098 (diff) | |
download | volse-hubzilla-266dab1b593a93d49ad97ab0cad9022486ba4c7f.tar.gz volse-hubzilla-266dab1b593a93d49ad97ab0cad9022486ba4c7f.tar.bz2 volse-hubzilla-266dab1b593a93d49ad97ab0cad9022486ba4c7f.zip |
turn url requests where argv[0] is something.xyz into module='something' and $_REQUEST['module_format'] = 'xyz'; But leave modules beginning with . (like .well_known) alone (convert the initial . to _ and then strip it). This really only affects Siteinfo_json at this time.
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r-- | Zotlabs/Module/Siteinfo.php | 7 | ||||
-rw-r--r-- | Zotlabs/Module/Siteinfo_json.php | 14 |
2 files changed, 3 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); - - } - -} |