Version 5.0.0 beta 4
This commit is contained in:
1 parent
e86153356a
commit
2f24f9de48
276 files changed
+8614
-6044
No files matched your search
+12
-15
@@ -159,21 +159,12 @@ class Url
|
||||
/* If we don't have a base, assume the template location */
|
||||
if ( !$base )
|
||||
{
|
||||
if ( Dispatcher::hasInstance() )
|
||||
{
|
||||
if ( Dispatcher::i()->controllerLocation === 'setup' )
|
||||
{
|
||||
return new static(( Request::i()->isSecure() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . ( $_SERVER['QUERY_STRING'] ? rtrim( mb_substr( $_SERVER['REQUEST_URI'], 0, -mb_strlen( $_SERVER['QUERY_STRING'] ) ), '?' ) : $_SERVER['REQUEST_URI'] ) . '?' . $queryString);
|
||||
}
|
||||
else
|
||||
{
|
||||
$base = Dispatcher::i()->controllerLocation;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$base = 'front';
|
||||
}
|
||||
$base = Dispatcher::hasInstance() ? Dispatcher::i()->controllerLocation : 'front';
|
||||
}
|
||||
|
||||
if( $base === 'setup' )
|
||||
{
|
||||
return new static(( Request::i()->isSecure() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . ( $_SERVER['QUERY_STRING'] ? rtrim( mb_substr( $_SERVER['REQUEST_URI'], 0, -mb_strlen( $_SERVER['QUERY_STRING'] ) ), '?' ) : $_SERVER['REQUEST_URI'] ) . '?' . $queryString);
|
||||
}
|
||||
|
||||
/* Front-End Friendly */
|
||||
@@ -322,6 +313,12 @@ class Url
|
||||
$return = Url::createFromComponents( $components['host'], $components['scheme'], $components['path'], $components['query'], $components['port'], $components['user'], $components['pass'], $components['fragment'] );
|
||||
}
|
||||
|
||||
/* If we are in setup, stop here */
|
||||
if( Dispatcher::hasInstance() and Dispatcher::i()->controllerLocation == 'setup' )
|
||||
{
|
||||
return $return;
|
||||
}
|
||||
|
||||
/* If the normal handling doesn't recognise it as an internal URL and we
|
||||
have a gateway file, check that */
|
||||
if ( Application::appIsEnabled( 'cms' ) and !( $return instanceof Internal ) and Settings::i()->cms_root_page_url )
|
||||
|
||||
Reference in new issue
Block a user