diff options
Diffstat (limited to 'mod/display.php')
-rw-r--r-- | mod/display.php | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/mod/display.php b/mod/display.php index e95a038ea..65114272a 100644 --- a/mod/display.php +++ b/mod/display.php @@ -40,6 +40,14 @@ function display_content(&$a, $update = 0, $load = false) { $channel = $a->get_channel(); + + $channel_acl = array( + 'allow_cid' => $channel['channel_allow_cid'], + 'allow_gid' => $channel['channel_allow_gid'], + 'deny_cid' => $channel['channel_deny_cid'], + 'deny_gid' => $channel['channel_deny_gid'] + ); + $x = array( 'is_owner' => true, 'allow_location' => ((intval(get_pconfig($channel['channel_id'],'system','use_browser_location'))) ? '1' : ''), @@ -47,7 +55,7 @@ function display_content(&$a, $update = 0, $load = false) { 'nickname' => $channel['channel_address'], 'lockstate' => (($group || $cid || $channel['channel_allow_cid'] || $channel['channel_allow_gid'] || $channel['channel_deny_cid'] || $channel['channel_deny_gid']) ? 'lock' : 'unlock'), - 'acl' => populate_acl($channel, false), + 'acl' => populate_acl($channel_acl, false), 'bang' => '', 'visitor' => 'block', 'profile_uid' => local_user(), @@ -131,13 +139,13 @@ function display_content(&$a, $update = 0, $load = false) { $sql_extra = public_permissions_sql(get_observer_hash()); - if($update && $load) { + if(($update && $load) || ($_COOKIE['jsAvailable'] != 1)) { $updateable = false; $pager_sql = sprintf(" LIMIT %d, %d ",intval($a->pager['start']), intval($a->pager['itemspage'])); - if($load) { + if($load || ($_COOKIE['jsAvailable'] != 1)) { $r = null; if(local_user()) { $r = q("SELECT * from item @@ -194,8 +202,11 @@ function display_content(&$a, $update = 0, $load = false) { } - - $o .= conversation($a, $items, 'display', $update, 'client'); + if ($_COOKIE['jsAvailable'] == 1) { + $o .= conversation($a, $items, 'display', $update, 'client'); + } else { + $o .= conversation($a, $items, 'display', $update, 'traditional'); + } if($updateable) { $x = q("UPDATE item SET item_flags = ( item_flags ^ %d ) |