From 266dab1b593a93d49ad97ab0cad9022486ba4c7f Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 13 Jul 2017 20:53:05 -0700 Subject: 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. --- boot.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'boot.php') 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) -- cgit v1.2.3