mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-09 05:38:39 +00:00
Fixing js -> php porting bugs
This commit is contained in:
parent
15c4eca1f9
commit
f5be923097
|
|
@ -89,17 +89,17 @@ class UriFactory
|
||||||
|
|
||||||
private static function unique(string $url) : string
|
private static function unique(string $url) : string
|
||||||
{
|
{
|
||||||
$parts = explode('?', url);
|
$parts = explode('?', $url);
|
||||||
|
|
||||||
if (count($parts) >= 2) {
|
if (count($parts) >= 2) {
|
||||||
$full = $parts[1];
|
$full = $parts[1];
|
||||||
$pars = explode('&', $full),
|
$pars = explode('&', $full);
|
||||||
$comps = [],
|
$comps = [];
|
||||||
$spl = null,
|
$spl = null;
|
||||||
$length = count($pars);
|
$length = count($pars);
|
||||||
|
|
||||||
for ($i = 0; $i < $length; $i++) {
|
for ($i = 0; $i < $length; $i++) {
|
||||||
$spl = explode('=', $pars[i]);
|
$spl = explode('=', $pars[$i]);
|
||||||
$comps[$spl[0]] = $spl[1];
|
$comps[$spl[0]] = $spl[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -147,7 +147,7 @@ class UriFactory
|
||||||
str_replace('&', '?', $parsed);
|
str_replace('&', '?', $parsed);
|
||||||
}
|
}
|
||||||
|
|
||||||
$parsed = self::uniqid($parsed);
|
$parsed = self::unique($parsed);
|
||||||
|
|
||||||
return $parsed;
|
return $parsed;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user