X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fcommunity.php;h=a9899994202848cf1c015555f6f472db173fd3ea;hb=bdb14d5aadce2f0a2f6dc9c898287ea424642dd8;hp=b10e3bfda8b6cb53bf31d275709c277547470c8b;hpb=1048ee744edf8904db1949a96859dcc9343f6092;p=friendica.git diff --git a/mod/community.php b/mod/community.php old mode 100644 new mode 100755 index b10e3bfda8..a989999420 --- a/mod/community.php +++ b/mod/community.php @@ -1,5 +1,12 @@ ' . t('Community') . ''; if(! $update) { - $o .= ''; + nav_set_selected('community'); $o .= '
' . "\r\n"; - $o .= "\r\n"; + $o .= "\r\n"; } if(x($a->data,'search')) @@ -42,11 +46,11 @@ function community_content(&$a, $update = 0) { $r = q("SELECT COUNT(*) AS `total` - FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` LEFT JOIN `profile` ON `profile`.`uid` = `item`.`uid` - WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 + FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` LEFT JOIN `user` ON `user`.`uid` = `item`.`uid` + WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0 AND `wall` = 1 AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' - AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND `profile`.`hidewall` = 0 - AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 AND `profile`.`is-default` = 1 " + AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND `user`.`hidewall` = 0 + AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 " ); if(count($r)) @@ -61,14 +65,13 @@ function community_content(&$a, $update = 0) { `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`, `contact`.`network`, `contact`.`thumb`, `contact`.`self`, `contact`.`writable`, `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`, - `user`.`nickname`, `profile`.`hidewall` + `user`.`nickname`, `user`.`hidewall` FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` LEFT JOIN `user` ON `user`.`uid` = `item`.`uid` - LEFT JOIN `profile` ON `profile`.`uid` = `item`.`uid` - WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 + WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0 AND `wall` = 1 AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' - AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND `profile`.`hidewall` = 0 - AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 AND `profile`.`is-default` = 1 + AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND `user`.`hidewall` = 0 + AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 ORDER BY `received` DESC LIMIT %d, %d ", intval($a->pager['start']), intval($a->pager['itemspage']) @@ -77,12 +80,10 @@ function community_content(&$a, $update = 0) { // we behave the same in message lists as the search module - $o .= conversation($a,$r,'search',false); + $o .= conversation($a,$r,'community',$update); $o .= paginate($a); - $o .= '
' . t('Shared content is covered by the Creative Commons Attribution 3.0 license.') . '
'; - return $o; }