X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fvideos.php;h=640c2a3b5592b165a163596e4e6ba31bad8a1881;hb=7635421d78e1b856fd409d9d7ef0cca7343c4bbf;hp=9f02441020b1aacd438b69805fc655e1dd89c883;hpb=ec02af593db87e78b0b388047ac4265aa5f987b1;p=friendica.git diff --git a/mod/videos.php b/mod/videos.php index 9f02441020..640c2a3b55 100644 --- a/mod/videos.php +++ b/mod/videos.php @@ -1,22 +1,25 @@ argc > 1) - auto_redir($a, $a->argv[1]); + DFRN::autoRedir($a, $a->argv[1]); if((Config::get('system','block_public')) && (! local_user()) && (! remote_user())) { return; @@ -44,12 +47,12 @@ function videos_init(App $a) { $tpl = get_markup_template("vcard-widget.tpl"); - $vcard_widget .= replace_macros($tpl, array( + $vcard_widget = replace_macros($tpl, array( '$name' => $profile['name'], '$photo' => $profile['photo'], - '$addr' => (($profile['addr'] != "") ? $profile['addr'] : ""), + '$addr' => defaults($profile, 'addr', ''), '$account_type' => $account_type, - '$pdesc' => (($profile['pdesc'] != "") ? $profile['pdesc'] : ""), + '$pdesc' => defaults($profile, 'pdesc', ''), )); @@ -280,8 +283,9 @@ function videos_content(App $a) { } } - // perhaps they're visiting - but not a community page, so they wouldn't have write access + $groups = []; + // perhaps they're visiting - but not a community page, so they wouldn't have write access if(remote_user() && (! $visitor)) { $contact_id = 0; if(is_array($_SESSION['remote'])) { @@ -293,7 +297,7 @@ function videos_content(App $a) { } } if($contact_id) { - $groups = init_groups_visitor($contact_id); + $groups = Group::getIdsByContactId($contact_id); $r = q("SELECT * FROM `contact` WHERE `blocked` = 0 AND `pending` = 0 AND `id` = %d AND `uid` = %d LIMIT 1", intval($contact_id), intval($owner_uid) @@ -317,7 +321,7 @@ function videos_content(App $a) { return; } - $sql_extra = permissions_sql($owner_uid,$remote_contact,$groups); + $sql_extra = permissions_sql($owner_uid, $remote_contact, $groups); $o = ""; @@ -378,14 +382,8 @@ function videos_content(App $a) { $videos = array(); if (DBM::is_result($r)) { foreach ($r as $rr) { - if ($a->theme['template_engine'] === 'internal') { - $alt_e = template_escape($rr['filename']); - $name_e = template_escape($rr['album']); - } - else { - $alt_e = $rr['filename']; - $name_e = $rr['album']; - } + $alt_e = $rr['filename']; + $name_e = $rr['album']; $videos[] = array( 'id' => $rr['id'],