From 91cc36514306e827c126ceed6c17486c85f5544c Mon Sep 17 00:00:00 2001 From: redmatrix Date: Tue, 12 Apr 2016 22:55:26 -0700 Subject: reverse the logic of the jsenabled setting so that sessions without js are performance penalised instead of regular sessions. --- mod/channel.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'mod/channel.php') diff --git a/mod/channel.php b/mod/channel.php index 2ef911bbb..9119f91a6 100644 --- a/mod/channel.php +++ b/mod/channel.php @@ -209,7 +209,7 @@ function channel_content(&$a, $update = 0, $load = false) { App::set_pager_itemspage(((intval($itemspage)) ? $itemspage : 20)); $pager_sql = sprintf(" LIMIT %d OFFSET %d ", intval(App::$pager['itemspage']), intval(App::$pager['start'])); - if($load || ($_COOKIE['jsAvailable'] != 1)) { + if($load || ($_COOKIE['jsdisabled'] == 1)) { if ($mid) { $r = q("SELECT parent AS item_id from item where mid = '%s' and uid = %d $item_normal AND item_wall = 1 $sql_extra limit 1", @@ -338,13 +338,13 @@ function channel_content(&$a, $update = 0, $load = false) { } - if($_COOKIE['jsAvailable'] == 1) { - $o .= conversation($a,$items,'channel',$update,$page_mode); - } else { + if($_COOKIE['jsdisabled'] == 1) { $o .= conversation($a,$items,'channel',$update,'traditional'); + } else { + $o .= conversation($a,$items,'channel',$update,$page_mode); } - if((! $update) || ($_COOKIE['jsAvailable'] != 1)) { + if((! $update) || ($_COOKIE['jsdisabled'] == 1)) { $o .= alt_pager($a,count($items)); if ($mid && $items[0]['title']) App::$page['title'] = $items[0]['title'] . " - " . App::$page['title']; -- cgit v1.2.3