]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Contact/Profile.php
Add Dice logging for Module creation
[friendica.git] / src / Module / Contact / Profile.php
index 660feaea93db8429b2f15fb2fb8970b3f1dfd691..88f927c40f6c7d9087de0d355b06e364fad35287 100644 (file)
@@ -71,7 +71,7 @@ class Profile extends BaseModule
                $this->config            = $config;
        }
 
-       protected function post(array $request = [], array $post = [])
+       protected function post(array $request = [])
        {
                if (!local_user()) {
                        return;
@@ -94,8 +94,8 @@ class Profile extends BaseModule
                        $fields['hidden'] = !empty($_POST['hidden']);
                }
 
-               if (isset($_POST['notify'])) {
-                       $fields['notify'] = !empty($_POST['notify']);
+               if (isset($_POST['notify_new_posts'])) {
+                       $fields['notify_new_posts'] = !empty($_POST['notify_new_posts']);
                }
 
                if (isset($_POST['fetch_further_information'])) {
@@ -157,10 +157,10 @@ class Profile extends BaseModule
                        $this->baseUrl->redirect('profile/' . $contact['nick'] . '/profile');
                }
 
-               if (isset($parameters['action'])) {
+               if (isset($this->parameters['action'])) {
                        self::checkFormSecurityTokenRedirectOnError('contact/' . $contact['id'], 'contact_action', 't');
 
-                       $cmd = $parameters['action'];
+                       $cmd = $this->parameters['action'];
                        if ($cmd === 'update' && $localRelationship->rel !== Contact::NOTHING) {
                                Module\Contact::updateContactFromPoll($contact['id']);
                        }
@@ -208,7 +208,7 @@ class Profile extends BaseModule
                $groups_widget = '';
 
                if (!in_array($localRelationship->rel, [Contact::NOTHING, Contact::SELF])) {
-                       $groups_widget = Group::sidebarWidget('contact', 'group', 'full', 'everyone', $contact['id']);
+                       $groups_widget = Group::sidebarWidget('contact', 'group', 'full', 'everyone', $data['user']);
                }
 
                $this->page['aside'] .= $vcard_widget . $groups_widget;
@@ -355,7 +355,7 @@ class Profile extends BaseModule
                        '$archived'                  => ($contact['archive'] ? $this->t('Currently archived') : ''),
                        '$pending'                   => ($contact['pending'] ? $this->t('Awaiting connection acknowledge') : ''),
                        '$hidden'                    => ['hidden', $this->t('Hide this contact from others'), $localRelationship->hidden, $this->t('Replies/likes to your public posts <strong>may</strong> still be visible')],
-                       '$notify'                    => ['notify', $this->t('Notification for new posts'), ($contact['notify_new_posts'] == 1), $this->t('Send a notification of every new post of this contact')],
+                       '$notify_new_posts'          => ['notify_new_posts', $this->t('Notification for new posts'), ($localRelationship->notifyNewPosts), $this->t('Send a notification of every new post of this contact')],
                        '$fetch_further_information' => $fetch_further_information,
                        '$ffi_keyword_denylist'      => ['ffi_keyword_denylist', $this->t('Keyword Deny List'), $localRelationship->ffiKeywordDenylist, $this->t('Comma separated list of keywords that should not be converted to hashtags, when "Fetch information and keywords" is selected')],
                        '$photo'                     => Contact::getPhoto($contact),