aboutsummaryrefslogtreecommitdiffstats
path: root/mod/public.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/public.php')
-rw-r--r--mod/public.php28
1 files changed, 15 insertions, 13 deletions
diff --git a/mod/public.php b/mod/public.php
index 64ae9d20a..45edda6c0 100644
--- a/mod/public.php
+++ b/mod/public.php
@@ -16,11 +16,13 @@ function public_content(&$a, $update = 0, $load = false) {
if(get_config('system','disable_discover_tab'))
return;
+ $item_normal = item_normal();
+
if(! $update) {
$maxheight = get_config('system','home_divmore_height');
if(! $maxheight)
- $maxheight = 75;
+ $maxheight = 400;
$o .= '<div id="live-public"></div>' . "\r\n";
$o .= "<script> var profile_uid = " . ((intval(local_channel())) ? local_channel() : (-1))
@@ -69,7 +71,7 @@ function public_content(&$a, $update = 0, $load = false) {
require_once('include/security.php');
if(get_config('system','site_firehose')) {
- $uids = " and item.uid in ( " . stream_perms_api_uids(PERMS_PUBLIC) . " ) and item_private = 0 and (item_flags & " . intval(ITEM_WALL) . " ) > 0 ";
+ $uids = " and item.uid in ( " . stream_perms_api_uids(PERMS_PUBLIC) . " ) and item_private = 0 and item_wall = 1 ";
}
else {
$sys = get_sys_channel();
@@ -78,10 +80,12 @@ function public_content(&$a, $update = 0, $load = false) {
$a->data['firehose'] = intval($sys['channel_id']);
}
+ if(get_config('system','public_list_mode'))
+ $page_mode = 'list';
+ else
+ $page_mode = 'client';
- $page_mode = 'list';
-
$simple_update = (($update) ? " and item.item_unseen = 1 " : '');
if($update && $_SESSION['loadtime'])
@@ -101,12 +105,11 @@ function public_content(&$a, $update = 0, $load = false) {
$r = q("SELECT distinct item.id AS item_id, $ordering FROM item
left join abook on item.author_xchan = abook.abook_xchan
- WHERE true $uids AND item.item_restrict = 0
+ WHERE true $uids $item_normal
AND item.parent = item.id
- and ((abook.abook_flags & %d) = 0 or abook.abook_flags is null)
+ and (abook.abook_blocked = 0 or abook.abook_flags is null)
$sql_extra3 $sql_extra $sql_nets
- ORDER BY $ordering DESC $pager_sql ",
- intval(ABOOK_FLAG_BLOCKED)
+ ORDER BY $ordering DESC $pager_sql "
);
@@ -115,11 +118,10 @@ function public_content(&$a, $update = 0, $load = false) {
$r = q("SELECT distinct item.id AS item_id, $ordering FROM item
left join abook on item.author_xchan = abook.abook_xchan
- WHERE true $uids AND item.item_restrict = 0
+ WHERE true $uids $item_normal
AND item.parent = item.id $simple_update
- and ((abook.abook_flags & %d) = 0 or abook.abook_flags is null)
- $sql_extra3 $sql_extra $sql_nets",
- intval(ABOOK_FLAG_BLOCKED)
+ and (abook.abook_blocked = 0 or abook.abook_flags is null)
+ $sql_extra3 $sql_extra $sql_nets"
);
$_SESSION['loadtime'] = datetime_convert();
}
@@ -132,7 +134,7 @@ function public_content(&$a, $update = 0, $load = false) {
$parents_str = ids_to_querystr($r,'item_id');
$items = q("SELECT item.*, item.id AS item_id FROM item
- WHERE true $uids AND item.item_restrict = 0
+ WHERE true $uids $item_normal
AND item.parent IN ( %s )
$sql_extra ",
dbesc($parents_str)