mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-23 19:32:29 +01:00
Fixed sort urls with no params not building full path
The provided partial path would be return which may not resolve to the full URL when used on systems like those hosting BookStack on a sub-path. Fixes #4201
This commit is contained in:
parent
607da73109
commit
647ce6c237
@ -147,7 +147,7 @@ function icon(string $name, array $attrs = []): string
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate a url with multiple parameters for sorting purposes.
|
* Generate a URL with multiple parameters for sorting purposes.
|
||||||
* Works out the logic to set the correct sorting direction
|
* Works out the logic to set the correct sorting direction
|
||||||
* Discards empty parameters and allows overriding.
|
* Discards empty parameters and allows overriding.
|
||||||
*/
|
*/
|
||||||
@ -172,7 +172,7 @@ function sortUrl(string $path, array $data, array $overrideData = []): string
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (count($queryStringSections) === 0) {
|
if (count($queryStringSections) === 0) {
|
||||||
return $path;
|
return url($path);
|
||||||
}
|
}
|
||||||
|
|
||||||
return url($path . '?' . implode('&', $queryStringSections));
|
return url($path . '?' . implode('&', $queryStringSections));
|
||||||
|
Loading…
Reference in New Issue
Block a user