aboutsummaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rwxr-xr-xindex.php18
1 files changed, 3 insertions, 15 deletions
diff --git a/index.php b/index.php
index a6ed3dbc6..278be154c 100755
--- a/index.php
+++ b/index.php
@@ -62,7 +62,7 @@ if(! App::$install) {
load_config('system');
load_config('feature');
- require_once('include/session.php');
+ \Zotlabs\Web\Session::init();
load_hooks();
call_hooks('init_1');
@@ -84,7 +84,7 @@ if(! App::$install) {
*
*/
-session_start();
+\Zotlabs\Web\Session::start();
/**
* Language was set earlier, but we can over-ride it in the session.
@@ -149,19 +149,8 @@ $Router = new Zotlabs\Web\Router($a);
if(! x(App::$page, 'content'))
App::$page['content'] = '';
+call_hooks('page_content_top', App::$page['content']);
-if(! (App::$module === 'setup')) {
- /* set JS cookie */
- if($_COOKIE['jsAvailable'] != 1) {
- App::$page['content'] .= '<script>document.cookie="jsAvailable=1; path=/"; var jsMatch = /\&JS=1/; if (!jsMatch.exec(location.href)) { location.href = location.href + "&JS=1"; }</script>';
- /* emulate JS cookie if cookies are not accepted */
- if ($_GET['JS'] == 1) {
- $_COOKIE['jsAvailable'] = 1;
- }
- }
-
- call_hooks('page_content_top', App::$page['content']);
-}
$Router->Dispatch($a);
@@ -190,5 +179,4 @@ call_hooks('page_end', App::$page['content']);
construct_page($a);
-session_write_close();
exit;