From 5a3903a40c508a6b5e9a90986564e5c4918223cc Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 26 Mar 2014 22:05:19 -0700 Subject: firehose testing (network?f=&fh=1) - some possible security bugs so testing purposes only --- mod/community.php | 105 ------------------------------------------------------ 1 file changed, 105 deletions(-) delete mode 100644 mod/community.php (limited to 'mod/community.php') diff --git a/mod/community.php b/mod/community.php deleted file mode 100644 index e4c6e6b04..000000000 --- a/mod/community.php +++ /dev/null @@ -1,105 +0,0 @@ -' . t('Community') . ''; - if(! $update) { - nav_set_selected('community'); - $o .= '
' . "\r\n"; - $o .= "\r\n"; - } - - if(x($a->data,'search')) - $search = notags(trim($a->data['search'])); - else - $search = ((x($_GET,'search')) ? notags(trim(rawurldecode($_GET['search']))) : ''); - - - // Here is the way permissions work in this module... - // Only public posts can be shown - // OR your own posts if you are a logged in member - - if(! get_pconfig(local_user(),'system','alt_pager')) { - $r = q("SELECT COUNT(distinct(`item`.`mid`)) AS `total` - 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 `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' - AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' - AND `item`.`private` = 0 AND `item`.`wall` = 1 AND `user`.`hidewall` = 0 - AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0" - ); - - if(count($r)) - $a->set_pager_total($r[0]['total']); - - if(! $r[0]['total']) { - info( t('No results.') . EOL); - return $o; - } - - } - - $r = q("SELECT distinct(`item`.`mid`), `item`.*, `item`.`id` AS `item_id`, - `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`alias`, `contact`.`rel`, - `contact`.`network`, `contact`.`thumb`, `contact`.`self`, `contact`.`writable`, - `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`, - `user`.`nickname`, `user`.`hidewall` - 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 `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' - AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' - AND `item`.`private` = 0 AND `item`.`wall` = 1 AND `user`.`hidewall` = 0 - AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0 group by `item`.`mid` - ORDER BY `received` DESC LIMIT %d, %d ", - intval($a->pager['start']), - intval($a->pager['itemspage']) - - ); - - if(! count($r)) { - info( t('No results.') . EOL); - return $o; - } - - // we behave the same in message lists as the search module - - $o .= conversation($a,$r,'community',$update); - - if(! get_pconfig(local_user(),'system','alt_pager')) { - $o .= paginate($a); - } - else { - $o .= alt_pager($a,count($r)); - } - - return $o; -} - -- cgit v1.2.3