aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Web/CheckJS.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Web/CheckJS.php')
-rw-r--r--Zotlabs/Web/CheckJS.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/Zotlabs/Web/CheckJS.php b/Zotlabs/Web/CheckJS.php
index 50af34a40..5f9856a8c 100644
--- a/Zotlabs/Web/CheckJS.php
+++ b/Zotlabs/Web/CheckJS.php
@@ -22,13 +22,11 @@ class CheckJS {
if($test) {
- logger('page=' . $page);
-
- if($_COOKIE['jsdisabled'] == 0) {
+ if(! array_key_exists('jsdisabled',$_COOKIE)) {
\App::$page['htmlhead'] .= "\r\n" . '<script>document.cookie="jsdisabled=0; path=/"; var jsMatch = /\&jsdisabled=0/; if (!jsMatch.exec(location.href)) { location.href = "' . z_root() . '/nojs/0?f=&redir=' . $page . '" ; }</script>' . "\r\n";
/* emulate JS cookie if cookies are not accepted */
- if ($_GET['jsdisabled'] == 0) {
- $_COOKIE['jsdisabled'] = 0;
+ if (array_key_exists('jsdisabled',$_GET)) {
+ $_COOKIE['jsdisabled'] = $_GET['jsdisabled'];
}
}
}