|
@@ -72,6 +72,12 @@ if (!TITLES_LINEAGE[array_key_last(TITLES_LINEAGE)]) {
|
|
exit('Page not found.');
|
|
exit('Page not found.');
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+if (isset($_SERVER['SERVER_NAME']) !== true)
|
|
|
|
+ exit('Missing <code>$_SERVER[\'SERVER_NAME\']</code>');
|
|
|
|
+if (in_array($_SERVER['SERVER_NAME'], CONF['common']['public_domains'], true) !== true)
|
|
|
|
+ exit('The current <code>$_SERVER[\'SERVER_NAME\']</code> is not allowed in configuration.');
|
|
|
|
+define('SERVER_NAME', $_SERVER['SERVER_NAME']);
|
|
|
|
+
|
|
const SESSION_COOKIE_NAME = 'servnest-session-key';
|
|
const SESSION_COOKIE_NAME = 'servnest-session-key';
|
|
function startSession() {
|
|
function startSession() {
|
|
session_start([
|
|
session_start([
|
|
@@ -119,12 +125,6 @@ if (isset($_SESSION['id'])) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-if (isset($_SERVER['SERVER_NAME']) !== true)
|
|
|
|
- output(500, 'Missing $_SERVER[\'SERVER_NAME\']');
|
|
|
|
-if (in_array($_SERVER['SERVER_NAME'], CONF['common']['public_domains'], true) !== true)
|
|
|
|
- output(500, 'The current server name is not allowed in configuration.');
|
|
|
|
-define('SERVER_NAME', $_SERVER['SERVER_NAME']);
|
|
|
|
-
|
|
|
|
function displayFinalMessage($data) {
|
|
function displayFinalMessage($data) {
|
|
if (isset($data['final_message'])) {
|
|
if (isset($data['final_message'])) {
|
|
echo $data['final_message'];
|
|
echo $data['final_message'];
|