]> git.mxchange.org Git - friendica.git/blobdiff - mod/videos.php
Prevent unfollowing contacts from networks not supported natively
[friendica.git] / mod / videos.php
index fcdd96d09c0a3e9405e0737905ed7b8168b413a7..e00df10a24b48d171fa05287c7456b86875a795d 100644 (file)
@@ -274,6 +274,7 @@ function videos_content(App $a)
        // perhaps they're visiting - but not a community page, so they wouldn't have write access
        if (remote_user() && (!$visitor)) {
                $contact_id = 0;
+
                if (!empty($_SESSION['remote'])) {
                        foreach($_SESSION['remote'] as $v) {
                                if($v['uid'] == $owner_uid) {
@@ -366,11 +367,12 @@ function videos_content(App $a)
                foreach ($r as $rr) {
                        $alt_e = $rr['filename'];
                        /// @todo The album isn't part of the above query. This seems to be some unfinished code that needs to be reworked completely.
+                       $rr['album'] = '';
                        $name_e = $rr['album'];
 
                        $videos[] = [
                                'id'       => $rr['id'],
-                               'link'     => System::baseUrl() . '/videos/' . $a->data['user']['nickname'] . '/video/' . $rr['resource-id'],
+                               'link'     => System::baseUrl() . '/videos/' . $a->data['user']['nickname'] . '/video/' . $rr['hash'],
                                'title'    => L10n::t('View Video'),
                                'src'      => System::baseUrl() . '/attach/' . $rr['id'] . '?attachment=0',
                                'alt'      => $alt_e,