revert the reversal of checkjs logic, but still restrict the behaviour scope to just those urls that require it

This commit is contained in:
redmatrix
2016-04-20 22:10:00 -07:00
parent f00a701ad1
commit 2b0a04ea9e
4 changed files with 20 additions and 7 deletions

View File

@@ -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);
}
}