X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=index.php;h=1b60071534c5df978ca5a9beea8e5e5adb5bd284;hb=992684c3620185da00663e25eb1460c4b18920ea;hp=a1e3282c3eef46d18aec44df22bda21a9e50adaa;hpb=3e5b9e97e74528b721ecd61b19c32e6d45e0f426;p=friendica.git diff --git a/index.php b/index.php index a1e3282c3e..1b60071534 100644 --- a/index.php +++ b/index.php @@ -191,6 +191,10 @@ if(strlen($a->module)) { if ($a->module == "stream") $a->module = "network"; + // Compatibility with the Firefox App + if (($a->module == "users") AND ($a->cmd == "users/sign_in")) + $a->module = "login"; + $privateapps = get_config('config','private_addons'); if(is_array($a->plugins) && in_array($a->module,$a->plugins) && file_exists("addon/{$a->module}/{$a->module}.php")) { @@ -428,7 +432,7 @@ else $a->page['htmlhead'] = str_replace('{{$stylesheet}}',$stylesheet,$a->page['htmlhead']); //$a->page['htmlhead'] = replace_macros($a->page['htmlhead'], array('$stylesheet' => $stylesheet)); -if (($_GET["mode"] == "raw") OR ($_GET["mode"] == "minimal")) { +if (isset($_GET["mode"]) AND (($_GET["mode"] == "raw") OR ($_GET["mode"] == "minimal"))) { $doc = new DOMDocument(); $target = new DOMDocument(); @@ -451,7 +455,7 @@ if (($_GET["mode"] == "raw") OR ($_GET["mode"] == "minimal")) { } } -if ($_GET["mode"] == "raw") { +if (isset($_GET["mode"]) AND ($_GET["mode"] == "raw")) { header("Content-type: text/html; charset=utf-8"); @@ -460,7 +464,8 @@ if ($_GET["mode"] == "raw") { session_write_close(); exit; -} elseif (get_pconfig(local_user(),'system','infinite_scroll') AND ($_GET["q"] == "network")) { +} elseif (get_pconfig(local_user(),'system','infinite_scroll') + AND ($a->module == "network") AND ($_GET["mode"] != "minimal")) { if (is_string($_GET["page"])) $pageno = $_GET["page"]; else @@ -470,7 +475,11 @@ if ($_GET["mode"] == "raw") { foreach ($_GET AS $param => $value) if (($param != "page") AND ($param != "q")) - $reload_uri .= "&".$param."=".$value; + $reload_uri .= "&".$param."=".urlencode($value); + + if (($a->page_offset != "") AND !strstr($reload_uri, "&offset=")) + $reload_uri .= "&offset=".urlencode($a->page_offset); + $a->page['htmlhead'] .= <<< EOT