mirror of
https://github.com/friendica/friendica
synced 2024-12-23 12:40:17 +00:00
Fix urlpath determination on the root page
This commit is contained in:
parent
39767fb366
commit
bd04c03c9f
1 changed files with 8 additions and 2 deletions
|
@ -442,8 +442,14 @@ class App
|
|||
*
|
||||
* To get /path/to/friendica we perform dirname() for as many levels as there are slashes in the QUERY_STRING
|
||||
*/
|
||||
if (!empty($_SERVER['SCRIPT_URL']) && !empty($_SERVER['QUERY_STRING'])) {
|
||||
if (!empty($_SERVER['SCRIPT_URL'])) {
|
||||
// Module
|
||||
if (!empty($_SERVER['QUERY_STRING'])) {
|
||||
$path = trim(dirname($_SERVER['SCRIPT_URL'], substr_count(trim($_SERVER['QUERY_STRING'], '/'), '/') + 1), '/');
|
||||
} else {
|
||||
// Root page
|
||||
$path = trim($_SERVER['SCRIPT_URL'], '/');
|
||||
}
|
||||
|
||||
if ($path && $path != $this->urlpath) {
|
||||
$this->urlpath = $path;
|
||||
|
|
Loading…
Reference in a new issue