Merge https://github.com/friendica/red into zpull
This commit is contained in:
commit
31efbe2f46
@ -245,6 +245,12 @@ if (file_exists($theme_info_file)){
|
|||||||
if(! x($a->page,'content'))
|
if(! x($a->page,'content'))
|
||||||
$a->page['content'] = '';
|
$a->page['content'] = '';
|
||||||
|
|
||||||
|
/* set JS cookie */
|
||||||
|
if($_COOKIE['jsAvailable'] != 1) {
|
||||||
|
$a->page['content'] .= '<script>document.cookie="jsAvailable=1; path=/"; location.reload();</script>';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if(! $install)
|
if(! $install)
|
||||||
call_hooks('page_content_top',$a->page['content']);
|
call_hooks('page_content_top',$a->page['content']);
|
||||||
|
|
||||||
|
@ -189,7 +189,7 @@ function channel_content(&$a, $update = 0, $load = false) {
|
|||||||
$a->set_pager_itemspage(((intval($itemspage)) ? $itemspage : 20));
|
$a->set_pager_itemspage(((intval($itemspage)) ? $itemspage : 20));
|
||||||
$pager_sql = sprintf(" LIMIT %d, %d ",intval($a->pager['start']), intval($a->pager['itemspage']));
|
$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
|
$r = q("SELECT distinct id AS item_id FROM item
|
||||||
left join abook on item.author_xchan = abook.abook_xchan
|
left join abook on item.author_xchan = abook.abook_xchan
|
||||||
WHERE uid = %d AND item_restrict = 0
|
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));
|
$o .= alt_pager($a,count($items));
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
|
Reference in New Issue
Block a user