]> git.mxchange.org Git - friendica.git/blobdiff - mod/videos.php
Cleaning confirm
[friendica.git] / mod / videos.php
index 408e2acaa6dfc75ea408a899abc91f87a98fe477..4120c136f177c009562fe385047b6ea82d59549c 100644 (file)
@@ -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;