X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=index.php;h=21e222e3b803c2d45e7dae07511b84eed66a0bf6;hb=8aa9c271dffe6ec6766b94486c0635c9db588db7;hp=0aceeda55a8174d2e6425ba656e554ab96fb3655;hpb=9f0715a9935966f3ec483bccc476d5baf3324b3c;p=quix0rs-gnu-social.git diff --git a/index.php b/index.php index 0aceeda55a..21e222e3b8 100644 --- a/index.php +++ b/index.php @@ -204,7 +204,7 @@ function checkMirror($action_obj, $args) function isLoginAction($action) { - static $loginActions = array('login', 'recoverpassword', 'api', 'doc', 'register', 'publicxrds', 'otp', 'opensearch', 'rsd'); + static $loginActions = array('login', 'recoverpassword', 'api', 'doc', 'register', 'publicxrds', 'otp', 'opensearch', 'rsd', 'hostmeta'); $login = null; @@ -225,12 +225,12 @@ function main() if ($_lighty_url['path'] != '/index.php' && $_lighty_url['path'] != '/') { $_lighty_path = preg_replace('/^'.preg_quote(common_config('site', 'path')).'\//', '', substr($_lighty_url['path'], 1)); $_SERVER['QUERY_STRING'] = 'p='.$_lighty_path; - if ($_lighty_url['query']) { + if (isset($_lighty_url['query']) && $_lighty_url['query'] != '') { $_SERVER['QUERY_STRING'] .= '&'.$_lighty_url['query']; - } - parse_str($_lighty_url['query'], $_lighty_query); - foreach ($_lighty_query as $key => $val) { - $_GET[$key] = $_REQUEST[$key] = $val; + parse_str($_lighty_url['query'], $_lighty_query); + foreach ($_lighty_query as $key => $val) { + $_GET[$key] = $_REQUEST[$key] = $val; + } } $_GET['p'] = $_REQUEST['p'] = $_lighty_path; }