aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Web/WebServer.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Web/WebServer.php')
-rw-r--r--Zotlabs/Web/WebServer.php18
1 files changed, 10 insertions, 8 deletions
diff --git a/Zotlabs/Web/WebServer.php b/Zotlabs/Web/WebServer.php
index f43ae10a4..d59effc88 100644
--- a/Zotlabs/Web/WebServer.php
+++ b/Zotlabs/Web/WebServer.php
@@ -2,6 +2,8 @@
namespace Zotlabs\Web;
+use Zotlabs\Lib\Text;
+
class WebServer {
public function run() {
@@ -13,11 +15,11 @@ class WebServer {
require_once('boot.php');
- sys_boot();
+ $installed = sys_boot();
\App::$language = get_best_language();
- load_translation_table(\App::$language,\App::$install);
+ load_translation_table(\App::$language, !$installed);
/**
@@ -56,11 +58,11 @@ class WebServer {
load_translation_table(\App::$language);
}
- if((x($_GET,'zid')) && (! \App::$install)) {
+ if (x($_GET,'zid') && $installed) {
\App::$query_string = strip_zids(\App::$query_string);
if(! local_channel()) {
- if (!isset($_SESSION['my_address']) || $_SESSION['my_address'] != $_GET['zid']) {
- $_SESSION['my_address'] = $_GET['zid'];
+ if (!isset($_SESSION['my_address'])) {
+ $_SESSION['my_address'] = Text::escape_tags($_GET['zid']);
$_SESSION['authenticated'] = 0;
}
if(!$_SESSION['authenticated']) {
@@ -69,14 +71,14 @@ class WebServer {
}
}
- if((x($_GET,'zat')) && (! \App::$install)) {
+ if (x($_GET,'zat') && $installed) {
\App::$query_string = strip_zats(\App::$query_string);
if(! local_channel()) {
zat_init();
}
}
- if((x($_REQUEST,'owt')) && (! \App::$install)) {
+ if (x($_REQUEST,'owt') && $installed) {
$token = $_REQUEST['owt'];
\App::$query_string = strip_query_param(\App::$query_string,'owt');
owt_init($token);
@@ -85,7 +87,7 @@ class WebServer {
if((x($_SESSION, 'authenticated')) || (x($_POST, 'auth-params')) || (\App::$module === 'login'))
require('include/auth.php');
- if(\App::$install) {
+ if (!$installed) {
/* Allow an exception for the view module so that pcss will be interpreted during installation */
if(\App::$module != 'view')
\App::$module = 'setup';