aboutsummaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-04-12 22:55:26 -0700
committerredmatrix <git@macgirvin.com>2016-04-12 22:55:26 -0700
commit91cc36514306e827c126ceed6c17486c85f5544c (patch)
treebb763fc5e2bb5e3becbce685efc977acb63b5979 /index.php
parentf4a27afee9c1dc12afd2a15adef9f33654fa5ddd (diff)
downloadvolse-hubzilla-91cc36514306e827c126ceed6c17486c85f5544c.tar.gz
volse-hubzilla-91cc36514306e827c126ceed6c17486c85f5544c.tar.bz2
volse-hubzilla-91cc36514306e827c126ceed6c17486c85f5544c.zip
reverse the logic of the jsenabled setting so that sessions without js are performance penalised instead of regular sessions.
Diffstat (limited to 'index.php')
-rwxr-xr-xindex.php13
1 files changed, 1 insertions, 12 deletions
diff --git a/index.php b/index.php
index 025d84063..278be154c 100755
--- a/index.php
+++ b/index.php
@@ -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);