diff --git a/cli-script.php b/cli-script.php index 577278b43..c775254f8 100755 --- a/cli-script.php +++ b/cli-script.php @@ -49,6 +49,20 @@ chdir(dirname($_SERVER['SCRIPT_FILENAME'])); */ 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\""); if(function_exists('mb_http_output')) { mb_http_output('UTF-8'); diff --git a/core/Core.php b/core/Core.php index a26d42bc6..2b195e9c6 100755 --- a/core/Core.php +++ b/core/Core.php @@ -53,15 +53,6 @@ function getTempFolder() { 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. * $_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 * @@ -140,4 +124,4 @@ function _t($entity, $string = "", $priority = 40, $context = "") { } -?> +?> \ No newline at end of file diff --git a/main.php b/main.php index f120a1ab1..99d5701d5 100644 --- a/main.php +++ b/main.php @@ -51,6 +51,20 @@ foreach ($envFiles as $envFile) { */ 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\""); if (function_exists('mb_http_output')) { mb_http_output('UTF-8');