Added "base_url" setting for Kohana::init()
This commit is contained in:
parent
1100d23757
commit
533cd102bd
|
@ -41,11 +41,6 @@ final class Kohana {
|
||||||
*/
|
*/
|
||||||
public static $magic_quotes = FALSE;
|
public static $magic_quotes = FALSE;
|
||||||
|
|
||||||
/**
|
|
||||||
* @var boolean cache the location of files across requests?
|
|
||||||
*/
|
|
||||||
public static $cache_paths = FALSE;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var boolean display errors and exceptions in output?
|
* @var boolean display errors and exceptions in output?
|
||||||
*/
|
*/
|
||||||
|
@ -61,6 +56,16 @@ final class Kohana {
|
||||||
*/
|
*/
|
||||||
public static $charset = 'utf-8';
|
public static $charset = 'utf-8';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var string base URL to the application
|
||||||
|
*/
|
||||||
|
public static $base_url = '/';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var boolean cache the location of files across requests?
|
||||||
|
*/
|
||||||
|
public static $cache_paths = FALSE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var object logging object
|
* @var object logging object
|
||||||
*/
|
*/
|
||||||
|
@ -163,6 +168,12 @@ final class Kohana {
|
||||||
self::$charset = strtolower($settings['charset']);
|
self::$charset = strtolower($settings['charset']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($settings['base_url']))
|
||||||
|
{
|
||||||
|
// Set the base URL
|
||||||
|
self::$base_url = rtrim($settings['base_url'], '/').'/';
|
||||||
|
}
|
||||||
|
|
||||||
// Determine if the extremely evil magic quotes are enabled
|
// Determine if the extremely evil magic quotes are enabled
|
||||||
self::$magic_quotes = (bool) get_magic_quotes_gpc();
|
self::$magic_quotes = (bool) get_magic_quotes_gpc();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue