mirror of
https://github.com/friendica/friendica
synced 2025-04-22 07:10:24 +00:00
Yeah, and again notices ... (#5536)
* Yeah, and again notices ... * And some more * Block access without given user name * Reformatting
This commit is contained in:
parent
71b1638d9a
commit
9d0f18c0b3
8 changed files with 82 additions and 68 deletions
|
@ -339,6 +339,11 @@ class Contact extends BaseObject
|
|||
$item = [];
|
||||
$item['verb'] = NAMESPACE_OSTATUS . "/unfollow";
|
||||
$item['follow'] = $contact["url"];
|
||||
$item['body'] = '';
|
||||
$item['title'] = '';
|
||||
$item['guid'] = '';
|
||||
$item['tag'] = '';
|
||||
$item['attach'] = '';
|
||||
$slap = OStatus::salmon($item, $user);
|
||||
|
||||
if (!empty($contact['notify'])) {
|
||||
|
@ -1505,6 +1510,11 @@ class Contact extends BaseObject
|
|||
$item = [];
|
||||
$item['verb'] = ACTIVITY_FOLLOW;
|
||||
$item['follow'] = $contact["url"];
|
||||
$item['body'] = '';
|
||||
$item['title'] = '';
|
||||
$item['guid'] = '';
|
||||
$item['tag'] = '';
|
||||
$item['attach'] = '';
|
||||
$slap = OStatus::salmon($item, $r[0]);
|
||||
if (!empty($contact['notify'])) {
|
||||
Salmon::slapper($r[0], $contact['notify'], $slap);
|
||||
|
|
|
@ -199,7 +199,7 @@ class Profile
|
|||
*/
|
||||
public static function getByNickname($nickname, $uid = 0, $profile_id = 0)
|
||||
{
|
||||
if (remote_user() && count($_SESSION['remote'])) {
|
||||
if (remote_user() && !empty($_SESSION['remote'])) {
|
||||
foreach ($_SESSION['remote'] as $visitor) {
|
||||
if ($visitor['uid'] == $uid) {
|
||||
$contact = DBA::selectFirst('contact', ['profile-id'], ['id' => $visitor['cid']]);
|
||||
|
@ -293,7 +293,7 @@ class Profile
|
|||
$connect = $profile['uid'] != local_user() ? L10n::t('Connect') : false;
|
||||
|
||||
// don't show connect link to authenticated visitors either
|
||||
if (remote_user() && count($_SESSION['remote'])) {
|
||||
if (remote_user() && !empty($_SESSION['remote'])) {
|
||||
foreach ($_SESSION['remote'] as $visitor) {
|
||||
if ($visitor['uid'] == $profile['uid']) {
|
||||
$connect = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue