X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fvideos.php;h=4120c136f177c009562fe385047b6ea82d59549c;hb=41663c7592abe55a958632c3a48265e0a8544d2b;hp=408e2acaa6dfc75ea408a899abc91f87a98fe477;hpb=518f28a7bf0b2e21feb82f7ba2477406e818313e;p=friendica.git diff --git a/mod/videos.php b/mod/videos.php index 408e2acaa6..4120c136f1 100644 --- a/mod/videos.php +++ b/mod/videos.php @@ -16,6 +16,7 @@ use Friendica\Model\Contact; use Friendica\Model\Group; use Friendica\Model\Item; use Friendica\Model\Profile; +use Friendica\Model\User; use Friendica\Protocol\DFRN; use Friendica\Util\Security; @@ -31,8 +32,6 @@ function videos_init(App $a) Nav::setSelected('home'); - $o = ''; - if ($a->argc > 1) { $nick = $a->argv[1]; $user = q("SELECT * FROM `user` WHERE `nickname` = '%s' AND `blocked` = 0 LIMIT 1", @@ -163,19 +162,12 @@ function videos_content(App $a) // if ($a->argc > 3) { $datatype = $a->argv[2]; - $datum = $a->argv[3]; } elseif(($a->argc > 2) && ($a->argv[2] === 'upload')) { $datatype = 'upload'; } else { $datatype = 'summary'; } - if ($a->argc > 4) { - $cmd = $a->argv[4]; - } else { - $cmd = 'view'; - } - // // Setup permissions structures // @@ -187,7 +179,7 @@ function videos_content(App $a) $owner_uid = $a->data['user']['uid']; - $community_page = (($a->data['user']['page-flags'] == Contact::PAGE_COMMUNITY) ? true : false); + $community_page = (($a->data['user']['page-flags'] == User::PAGE_FLAGS_COMMUNITY) ? true : false); if ((local_user()) && (local_user() == $owner_uid)) { $can_post = true; @@ -209,7 +201,6 @@ function videos_content(App $a) if (DBA::isResult($r)) { $can_post = true; - $contact = $r[0]; $remote_contact = true; $visitor = $contact_id; } @@ -239,17 +230,11 @@ function videos_content(App $a) ); if (DBA::isResult($r)) { - $contact = $r[0]; $remote_contact = true; } } } - if (!$remote_contact && local_user()) { - $contact_id = $_SESSION['cid']; - $contact = $a->contact; - } - if ($a->data['user']['hidewall'] && (local_user() != $owner_uid) && (!$remote_contact)) { notice(L10n::t('Access to this item is restricted.') . EOL); return;