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.

This commit is contained in:
zotlabs
2017-07-13 20:53:05 -07:00
parent 2d119c81a4
commit 266dab1b59
3 changed files with 8 additions and 18 deletions

View File

@@ -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'),