mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ENHANCEMENT Moved procedural bootstrapping code hiding away between function definitions in Core.php to main.php and cli-script.php (TEMP_FOLDER and PR_* constants)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63153 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
ce1f2e2b3a
commit
12a73455ac
@ -49,6 +49,20 @@ chdir(dirname($_SERVER['SCRIPT_FILENAME']));
|
|||||||
*/
|
*/
|
||||||
require_once("core/Core.php");
|
require_once("core/Core.php");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define the temporary folder if it wasn't defined yet
|
||||||
|
*/
|
||||||
|
if(!defined('TEMP_FOLDER')) {
|
||||||
|
define('TEMP_FOLDER', getTempFolder());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Priorities definition. These constants are used in calls to _t() as an optional argument
|
||||||
|
*/
|
||||||
|
define('PR_HIGH',100);
|
||||||
|
define('PR_MEDIUM',50);
|
||||||
|
define('PR_LOW',10);
|
||||||
|
|
||||||
header("Content-type: text/html; charset=\"utf-8\"");
|
header("Content-type: text/html; charset=\"utf-8\"");
|
||||||
if(function_exists('mb_http_output')) {
|
if(function_exists('mb_http_output')) {
|
||||||
mb_http_output('UTF-8');
|
mb_http_output('UTF-8');
|
||||||
|
@ -53,15 +53,6 @@ function getTempFolder() {
|
|||||||
return $ssTmp;
|
return $ssTmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Define the temporary folder if it wasn't defined yet
|
|
||||||
*/
|
|
||||||
if(!defined('TEMP_FOLDER')) {
|
|
||||||
define('TEMP_FOLDER', getTempFolder());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sapphire class autoloader. Requires the ManifestBuilder to work.
|
* Sapphire class autoloader. Requires the ManifestBuilder to work.
|
||||||
* $_CLASS_MANIFEST must have been loaded up by ManifestBuilder for this to successfully load
|
* $_CLASS_MANIFEST must have been loaded up by ManifestBuilder for this to successfully load
|
||||||
@ -107,13 +98,6 @@ function stripslashes_recursively(&$array) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Priorities definition. These constants are used in calls to _t() as an optional argument
|
|
||||||
*/
|
|
||||||
define('PR_HIGH',100);
|
|
||||||
define('PR_MEDIUM',50);
|
|
||||||
define('PR_LOW',10);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the main translator function. Returns the string defined by $class and $entity according to the currently set locale
|
* This is the main translator function. Returns the string defined by $class and $entity according to the currently set locale
|
||||||
*
|
*
|
||||||
|
14
main.php
14
main.php
@ -51,6 +51,20 @@ foreach ($envFiles as $envFile) {
|
|||||||
*/
|
*/
|
||||||
require_once("core/Core.php");
|
require_once("core/Core.php");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define the temporary folder if it wasn't defined yet
|
||||||
|
*/
|
||||||
|
if(!defined('TEMP_FOLDER')) {
|
||||||
|
define('TEMP_FOLDER', getTempFolder());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Priorities definition. These constants are used in calls to _t() as an optional argument
|
||||||
|
*/
|
||||||
|
define('PR_HIGH',100);
|
||||||
|
define('PR_MEDIUM',50);
|
||||||
|
define('PR_LOW',10);
|
||||||
|
|
||||||
header("Content-type: text/html; charset=\"utf-8\"");
|
header("Content-type: text/html; charset=\"utf-8\"");
|
||||||
if (function_exists('mb_http_output')) {
|
if (function_exists('mb_http_output')) {
|
||||||
mb_http_output('UTF-8');
|
mb_http_output('UTF-8');
|
||||||
|
Loading…
Reference in New Issue
Block a user