Skip to content

Commit

Permalink
[FIX] Route with action ID.
Browse files Browse the repository at this point in the history
  • Loading branch information
Seiger committed May 14, 2024
1 parent e3a1975 commit 42e6871
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/sMultisite.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function domains(): array
}

/**
* Get url from route name
* Get url from route name with action id
*
* @param string $name Route name
* @return string
Expand All @@ -46,7 +46,15 @@ public function route(string $name): string
if (evo()->getConfig('friendly_url_suffix', '') != '/') {
$route = str_ireplace(evo()->getConfig('friendly_url_suffix', ''), '', route($name));
}
return $route . '/';

$a = 0;
$arr = str_split($name, 1);
foreach ($arr as $n) {
$a += ord($n);
}
$a = $a < 999 ? $a + 999 : $a;

return $route.'?a='.$a;
}

/**
Expand Down

0 comments on commit 42e6871

Please sign in to comment.