aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Nojs.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-04-20 22:10:00 -0700
committerredmatrix <git@macgirvin.com>2016-04-20 22:10:00 -0700
commit2b0a04ea9e91196e2966844be0f6b673bd87f032 (patch)
tree990e011709cbe2dc18cf3c3c756e50e6e15b5c43 /Zotlabs/Module/Nojs.php
parentf00a701ad104737fd3a25eabec88ec47b9ce8a32 (diff)
downloadvolse-hubzilla-2b0a04ea9e91196e2966844be0f6b673bd87f032.tar.gz
volse-hubzilla-2b0a04ea9e91196e2966844be0f6b673bd87f032.tar.bz2
volse-hubzilla-2b0a04ea9e91196e2966844be0f6b673bd87f032.zip
revert the reversal of checkjs logic, but still restrict the behaviour scope to just those urls that require it
Diffstat (limited to 'Zotlabs/Module/Nojs.php')
-rw-r--r--Zotlabs/Module/Nojs.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/Zotlabs/Module/Nojs.php b/Zotlabs/Module/Nojs.php
index 5e48c5b5f..6fd6d8106 100644
--- a/Zotlabs/Module/Nojs.php
+++ b/Zotlabs/Module/Nojs.php
@@ -5,11 +5,11 @@ namespace Zotlabs\Module;
class Nojs extends \Zotlabs\Web\Controller {
function init() {
-
- setcookie('jsdisabled', 1, 0);
- $p = $_GET['query'];
+ $n = ((argc() > 1) ? intval(argv(1)) : 1);
+ setcookie('jsdisabled', $n, 0, '/');
+ $p = $_GET['redir'];
$hasq = strpos($p,'?');
- goaway(z_root() . (($p) ? '/' . $p : '') . (($hasq) ? '' : '?f=' ) . '&jsdisabled=1');
+ goaway(z_root() . (($p) ? '/' . $p : '') . (($hasq) ? '' : '?f=' ) . '&jsdisabled=' . $n);
}
}