aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzottel <github@zottel.net>2013-12-09 13:30:35 +0100
committerzottel <github@zottel.net>2013-12-09 13:30:35 +0100
commitc20f207cde7c4bfcfc856542cffe7db273694c6e (patch)
tree1f145aea163d6f80f6874fd5fb13b9a14945fe6d
parent198264aaf917b8365b5de3ec92d0ae44eabe0395 (diff)
downloadvolse-hubzilla-c20f207cde7c4bfcfc856542cffe7db273694c6e.tar.gz
volse-hubzilla-c20f207cde7c4bfcfc856542cffe7db273694c6e.tar.bz2
volse-hubzilla-c20f207cde7c4bfcfc856542cffe7db273694c6e.zip
enable JS-less display of channel
-rw-r--r--mod/channel.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/mod/channel.php b/mod/channel.php
index 2014cd08b..7879f72ee 100644
--- a/mod/channel.php
+++ b/mod/channel.php
@@ -189,7 +189,7 @@ function channel_content(&$a, $update = 0, $load = false) {
$a->set_pager_itemspage(((intval($itemspage)) ? $itemspage : 20));
$pager_sql = sprintf(" LIMIT %d, %d ",intval($a->pager['start']), intval($a->pager['itemspage']));
- if($load) {
+ if($load || ($_COOKIE['jsAvailable'] != 1)) {
$r = q("SELECT distinct id AS item_id FROM item
left join abook on item.author_xchan = abook.abook_xchan
WHERE uid = %d AND item_restrict = 0
@@ -281,9 +281,13 @@ function channel_content(&$a, $update = 0, $load = false) {
}
- $o .= conversation($a,$items,'channel',$update,'client');
+ if($_COOKIE['jsAvailable'] == 1) {
+ $o .= conversation($a,$items,'channel',$update,'client');
+ } else {
+ $o .= conversation($a,$items,'channel',$update,'traditional');
+ }
- if(! $update)
+ if((! $update) || ($_COOKIE['jsAvailable'] != 1))
$o .= alt_pager($a,count($items));
return $o;