]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Profile/Media.php
Create Profile\Photos\Upload class
[friendica.git] / src / Module / Profile / Media.php
index 0f34b267deac81ed1a522c30f34ee46eedff8fcd..bae2f9ad86060fa93d99c739d7324dd279fd34e2 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -29,11 +29,11 @@ use Friendica\Network\HTTPException;
 
 class Media extends BaseProfile
 {
-       public function content(): string
+       protected function content(array $request = []): string
        {
                $a = DI::app();
 
-               $profile = ProfileModel::load($a, static::$parameters['nickname']);
+               $profile = ProfileModel::load($a, $this->parameters['nickname']);
                if (empty($profile)) {
                        throw new HTTPException\NotFoundException(DI::l10n()->t('User not found.'));
                }
@@ -42,7 +42,7 @@ class Media extends BaseProfile
                        DI::page()['htmlhead'] .= '<meta content="noindex, noarchive" name="robots" />' . "\n";
                }
 
-               $is_owner = local_user() == $profile['uid'];
+               $is_owner = DI::userSession()->getLocalUserId() == $profile['uid'];
 
                $o = self::getTabsHTML($a, 'media', $is_owner, $profile['nickname'], $profile['hide-friends']);