]> git.mxchange.org Git - friendica.git/blobdiff - mod/videos.php
Merge pull request #5862 from nupplaphil/rename_App_Methods
[friendica.git] / mod / videos.php
index 4bd0ab4f3262431f6f7b0fee5f347a1247ba226e..e52c78cab11f794a0b5f2e4fdd7ab30dfd35c2a0 100644 (file)
@@ -341,8 +341,8 @@ function videos_content(App $a)
        );
 
        if (DBA::isResult($r)) {
-               $a->set_pager_total(count($r));
-               $a->set_pager_itemspage(20);
+               $a->setPagerTotal(count($r));
+               $a->setPagerItemsPage(20);
        }
 
        $r = q("SELECT hash, ANY_VALUE(`id`) AS `id`, ANY_VALUE(`created`) AS `created`,
@@ -361,11 +361,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,