|
|
@ -14,7 +14,7 @@ class LegacyUrlGenerator extends UrlGenerator
|
|
|
|
* @param array $parameters
|
|
|
|
* @param array $parameters
|
|
|
|
* @return string urls in the form <app url>/index.php?p=<path>&<parameters>
|
|
|
|
* @return string urls in the form <app url>/index.php?p=<path>&<parameters>
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function link_to($path, $parameters = [])
|
|
|
|
public function linkTo($path, $parameters = [])
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$page = ltrim($path, '/');
|
|
|
|
$page = ltrim($path, '/');
|
|
|
|
if (!empty($page)) {
|
|
|
|
if (!empty($page)) {
|
|
|
@ -22,7 +22,7 @@ class LegacyUrlGenerator extends UrlGenerator
|
|
|
|
$parameters = array_merge(['p' => $page], $parameters);
|
|
|
|
$parameters = array_merge(['p' => $page], $parameters);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$uri = parent::link_to('index.php', $parameters);
|
|
|
|
$uri = parent::linkTo('index.php', $parameters);
|
|
|
|
$uri = preg_replace('~(/index\.php)+~', '/index.php', $uri);
|
|
|
|
$uri = preg_replace('~(/index\.php)+~', '/index.php', $uri);
|
|
|
|
|
|
|
|
|
|
|
|
return $uri;
|
|
|
|
return $uri;
|
|
|
|