mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Doing some refactoring, to reduce code duplication.
This commit is contained in:
parent
3ca0cdb1ee
commit
dbce29a058
1 changed files with 8 additions and 9 deletions
|
@ -820,16 +820,15 @@ class Router {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$protocol = strpos($output, '://');
|
$protocol = strpos($output, '://');
|
||||||
if ($protocol > 3 && $protocol < 6) {
|
if ($protocol === false || $protocol > 6) {
|
||||||
return $output . $extension . self::queryString($q, array(), $escape) . $frag;
|
$output = str_replace('//', '/', $base . '/' . $output);
|
||||||
}
|
|
||||||
$output = str_replace('//', '/', $base . '/' . $output);
|
|
||||||
|
|
||||||
if ($full && defined('FULL_BASE_URL')) {
|
if ($full && defined('FULL_BASE_URL')) {
|
||||||
$output = FULL_BASE_URL . $output;
|
$output = FULL_BASE_URL . $output;
|
||||||
}
|
}
|
||||||
if (!empty($extension)) {
|
if (!empty($extension)) {
|
||||||
$output = rtrim($output, '/');
|
$output = rtrim($output, '/');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $output . $extension . self::queryString($q, array(), $escape) . $frag;
|
return $output . $extension . self::queryString($q, array(), $escape) . $frag;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue