summaryrefslogtreecommitdiff
path: root/src/SemanticScuttle
diff options
context:
space:
mode:
Diffstat (limited to 'src/SemanticScuttle')
-rw-r--r--src/SemanticScuttle/constants.php5
-rw-r--r--src/SemanticScuttle/header.php8
2 files changed, 7 insertions, 6 deletions
diff --git a/src/SemanticScuttle/constants.php b/src/SemanticScuttle/constants.php
index e37f41c..95c4384 100644
--- a/src/SemanticScuttle/constants.php
+++ b/src/SemanticScuttle/constants.php
@@ -11,10 +11,7 @@ if(isset($GLOBALS['debugMode'])) {
}
// Determine the base URL as ROOT
-if (!isset($_SERVER['HTTP_HOST'])) {
- //not set in unit tests
- define('ROOT', 'http://localhost/');
-} else if (!isset($GLOBALS['root'])) {
+if (!isset($GLOBALS['root'])) {
$pieces = explode('/', $_SERVER['SCRIPT_NAME']);
$rootTmp = '/';
diff --git a/src/SemanticScuttle/header.php b/src/SemanticScuttle/header.php
index b01679c..53dcad6 100644
--- a/src/SemanticScuttle/header.php
+++ b/src/SemanticScuttle/header.php
@@ -45,7 +45,9 @@ T_bind_textdomain_codeset($domain, 'UTF-8');
T_textdomain($domain);
// 4 // Session
-session_start();
+if (!defined('UNIT_TEST_MODE')) {
+ session_start();
+}
// 5 // Create mandatory services and objects
$userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
@@ -57,5 +59,7 @@ $tplVars['currentUser'] = $currentUser;
$tplVars['userservice'] = $userservice;
// 6 // Force UTF-8 behaviour for server (cannot be move into top.inc.php which is not included into every file)
-header('Content-Type: text/html; charset=utf-8');
+if (!defined('UNIT_TEST_MODE')) {
+ header('Content-Type: text/html; charset=utf-8');
+}
?>