]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Contact.php
Replace profile tab GET parameter by route
[friendica.git] / src / Model / Contact.php
index 9b8f98c78dd5300a4d3f9d0f813b2b8c07745701..201447437945e3aa075d1c60a95e120ee65fcb45 100644 (file)
@@ -6,7 +6,6 @@ namespace Friendica\Model;
 
 use Friendica\App\BaseURL;
 use Friendica\Content\Pager;
-use Friendica\Core\Config;
 use Friendica\Core\Hook;
 use Friendica\Core\Logger;
 use Friendica\Core\Protocol;
@@ -724,7 +723,7 @@ class Contact
 
                $fields = ['name', 'photo', 'thumb', 'about', 'address', 'locality', 'region',
                        'country-name', 'gender', 'pub_keywords', 'xmpp', 'net-publish'];
-               $profile = DBA::selectFirst('profile', $fields, ['uid' => $uid, 'is-default' => true]);
+               $profile = DBA::selectFirst('profile', $fields, ['uid' => $uid]);
                if (!DBA::isResult($profile)) {
                        return;
                }
@@ -801,7 +800,7 @@ class Contact
                        // Update the profile
                        $fields = ['photo' => DI::baseUrl() . '/photo/profile/' .$uid . '.' . $file_suffix,
                                'thumb' => DI::baseUrl() . '/photo/avatar/' . $uid .'.' . $file_suffix];
-                       DBA::update('profile', $fields, ['uid' => $uid, 'is-default' => true]);
+                       DBA::update('profile', $fields, ['uid' => $uid]);
                }
        }
 
@@ -1231,9 +1230,9 @@ class Contact
                }
 
                if ($sparkle) {
-                       $status_link = $profile_link . '?tab=status';
+                       $status_link = $profile_link . '/status';
                        $photos_link = str_replace('/profile/', '/photos/', $profile_link);
-                       $profile_link = $profile_link . '?tab=profile';
+                       $profile_link = $profile_link . '/profile';
                }
 
                if (self::canReceivePrivateMessages($contact) && empty($contact['pending'])) {