mirror of
https://github.com/friendica/friendica
synced 2024-11-10 06:22:53 +00:00
search privacy enhancements for those with blocked walls
This commit is contained in:
parent
ce8f31504e
commit
c9cce9873d
2 changed files with 7 additions and 3 deletions
|
@ -248,6 +248,10 @@ function item_post(&$a) {
|
||||||
|
|
||||||
$private = ((strlen($str_group_allow) || strlen($str_contact_allow) || strlen($str_group_deny) || strlen($str_contact_deny)) ? 1 : 0);
|
$private = ((strlen($str_group_allow) || strlen($str_contact_allow) || strlen($str_group_deny) || strlen($str_contact_deny)) ? 1 : 0);
|
||||||
|
|
||||||
|
|
||||||
|
if($user['hidewall'])
|
||||||
|
$private = 2;
|
||||||
|
|
||||||
// If this is a comment, set the permissions from the parent.
|
// If this is a comment, set the permissions from the parent.
|
||||||
|
|
||||||
if($parent_item) {
|
if($parent_item) {
|
||||||
|
|
|
@ -149,7 +149,7 @@ function search_content(&$a) {
|
||||||
FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` LEFT JOIN `user` ON `user`.`uid` = `item`.`uid`
|
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
|
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 `user`.`hidewall` = 0)
|
AND (( `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND `item`.`private` = 0 AND `user`.`hidewall` = 0)
|
||||||
OR `item`.`uid` = %d )
|
OR ( `item`.`uid` = %d ))
|
||||||
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
|
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
|
||||||
$sql_extra group by `item`.`uri` ",
|
$sql_extra group by `item`.`uri` ",
|
||||||
intval(local_user())
|
intval(local_user())
|
||||||
|
@ -168,12 +168,12 @@ function search_content(&$a) {
|
||||||
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`alias`, `contact`.`rel`,
|
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`alias`, `contact`.`rel`,
|
||||||
`contact`.`network`, `contact`.`thumb`, `contact`.`self`, `contact`.`writable`,
|
`contact`.`network`, `contact`.`thumb`, `contact`.`self`, `contact`.`writable`,
|
||||||
`contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`,
|
`contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`,
|
||||||
`user`.`nickname`
|
`user`.`nickname`, `user`.`uid`, `user`.`hidewall`
|
||||||
FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
|
FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
|
||||||
LEFT JOIN `user` ON `user`.`uid` = `item`.`uid`
|
LEFT JOIN `user` ON `user`.`uid` = `item`.`uid`
|
||||||
WHERE `item`.`visible` = 1 AND `item`.`deleted` = 0 and `item`.`moderated` = 0
|
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 `user`.`hidewall` = 0 )
|
AND (( `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = '' AND `item`.`private` = 0 AND `user`.`hidewall` = 0 )
|
||||||
OR `item`.`uid` = %d )
|
OR ( `item`.`uid` = %d ))
|
||||||
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
|
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
|
||||||
$sql_extra
|
$sql_extra
|
||||||
group by `item`.`uri`
|
group by `item`.`uri`
|
||||||
|
|
Loading…
Reference in a new issue