aboutsummaryrefslogtreecommitdiffstats
path: root/mod/channel.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 /mod/channel.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 'mod/channel.php')
-rw-r--r--mod/channel.php10
1 files changed, 5 insertions, 5 deletions
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'];