Merge pull request #8320 from annando/hidewall
Replace "hidewall" with "net-publish" / other "hidewall" stuff
This commit is contained in:
commit
c3f1da23a6
|
@ -45,7 +45,7 @@ function msearch_post(App $a)
|
||||||
"SELECT COUNT(*) AS `total`
|
"SELECT COUNT(*) AS `total`
|
||||||
FROM `profile`
|
FROM `profile`
|
||||||
JOIN `user` ON `user`.`uid` = `profile`.`uid`
|
JOIN `user` ON `user`.`uid` = `profile`.`uid`
|
||||||
WHERE `user`.`hidewall` = 0
|
WHERE `profile`.`net-publish`
|
||||||
AND MATCH(`pub_keywords`) AGAINST (?)",
|
AND MATCH(`pub_keywords`) AGAINST (?)",
|
||||||
$search
|
$search
|
||||||
);
|
);
|
||||||
|
@ -60,7 +60,7 @@ function msearch_post(App $a)
|
||||||
"SELECT `pub_keywords`, `username`, `nickname`, `user`.`uid`
|
"SELECT `pub_keywords`, `username`, `nickname`, `user`.`uid`
|
||||||
FROM `user`
|
FROM `user`
|
||||||
JOIN `profile` ON `user`.`uid` = `profile`.`uid`
|
JOIN `profile` ON `user`.`uid` = `profile`.`uid`
|
||||||
WHERE `user`.`hidewall` = 0
|
WHERE `profile`.`net-publish`
|
||||||
AND MATCH(`pub_keywords`) AGAINST (?)
|
AND MATCH(`pub_keywords`) AGAINST (?)
|
||||||
LIMIT ?, ?",
|
LIMIT ?, ?",
|
||||||
$search,
|
$search,
|
||||||
|
|
12
mod/poco.php
12
mod/poco.php
|
@ -81,15 +81,13 @@ function poco_init(App $a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$system_mode && !$global) {
|
if (!$system_mode && !$global) {
|
||||||
$users = q("SELECT `user`.*,`profile`.`hide-friends` from user left join profile on `user`.`uid` = `profile`.`uid`
|
$user = DBA::fetchFirst("SELECT `user`.`uid`, `user`.`nickname` FROM `user`
|
||||||
where `user`.`nickname` = '%s' limit 1",
|
INNER JOIN `profile` ON `user`.`uid` = `profile`.`uid`
|
||||||
DBA::escape($nickname)
|
WHERE `user`.`nickname` = ? AND NOT `profile`.`hide-friends`",
|
||||||
);
|
$nickname);
|
||||||
if (! DBA::isResult($users) || $users[0]['hidewall'] || $users[0]['hide-friends']) {
|
if (!DBA::isResult($user)) {
|
||||||
throw new \Friendica\Network\HTTPException\NotFoundException();
|
throw new \Friendica\Network\HTTPException\NotFoundException();
|
||||||
}
|
}
|
||||||
|
|
||||||
$user = $users[0];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($justme) {
|
if ($justme) {
|
||||||
|
|
|
@ -704,7 +704,7 @@ class Contact
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$fields = ['nickname', 'page-flags', 'account-type', 'hidewall'];
|
$fields = ['nickname', 'page-flags', 'account-type'];
|
||||||
$user = DBA::selectFirst('user', $fields, ['uid' => $uid]);
|
$user = DBA::selectFirst('user', $fields, ['uid' => $uid]);
|
||||||
if (!DBA::isResult($user)) {
|
if (!DBA::isResult($user)) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user