X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fvideos.php;h=bb0e0c237fd432aff144e5cd804dcdf853432ab5;hb=88ef61df95ed1b26e44d0b28bf22a1c682b5899a;hp=c75e8b943f85bd3933d413e1b0b47926c92021cb;hpb=478e363967165980eb826e8d109dd15770e2c784;p=friendica.git diff --git a/mod/videos.php b/mod/videos.php index c75e8b943f..bb0e0c237f 100644 --- a/mod/videos.php +++ b/mod/videos.php @@ -1,8 +1,11 @@ argc > 1) auto_redir($a, $a->argv[1]); - if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) { + if((Config::get('system','block_public')) && (! local_user()) && (! remote_user())) { return; } @@ -37,7 +40,7 @@ function videos_init(App $a) { $profile = get_profiledata_by_nick($nick, $a->profile_uid); - $account_type = account_type($profile); + $account_type = Contact::getAccountType($profile); $tpl = get_markup_template("vcard-widget.tpl"); @@ -147,7 +150,7 @@ function videos_post(App $a) { dbesc($video_id) ); - if (dbm::is_result($r)) { + if (DBM::is_result($r)) { q("DELETE FROM `attach` WHERE `uid` = %d AND `id` = '%s'", intval(local_user()), dbesc($video_id) @@ -157,7 +160,7 @@ function videos_post(App $a) { intval(local_user()) ); //echo "
"; var_dump($i); killme(); - if (dbm::is_result($i)) { + if (DBM::is_result($i)) { q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s' WHERE `parent-uri` = '%s' AND `uid` = %d", dbesc(datetime_convert()), dbesc(datetime_convert()), @@ -171,7 +174,7 @@ function videos_post(App $a) { $drop_id = intval($i[0]['id']); if ($i[0]['visible']) { - Worker::add(PRIORITY_HIGH, "notifier", "drop", $drop_id); + Worker::add(PRIORITY_HIGH, "Notifier", "drop", $drop_id); } } } @@ -198,7 +201,7 @@ function videos_content(App $a) { // videos/name/video/xxxxx/edit - if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) { + if((Config::get('system','block_public')) && (! local_user()) && (! remote_user())) { notice( t('Public access denied.') . EOL); return; } @@ -267,7 +270,7 @@ function videos_content(App $a) { intval($contact_id), intval($owner_uid) ); - if (dbm::is_result($r)) { + if (DBM::is_result($r)) { $can_post = true; $contact = $r[0]; $remote_contact = true; @@ -295,7 +298,7 @@ function videos_content(App $a) { intval($contact_id), intval($owner_uid) ); - if (dbm::is_result($r)) { + if (DBM::is_result($r)) { $contact = $r[0]; $remote_contact = true; } @@ -355,7 +358,7 @@ function videos_content(App $a) { $sql_extra GROUP BY hash", intval($a->data['user']['uid']) ); - if (dbm::is_result($r)) { + if (DBM::is_result($r)) { $a->set_pager_total(count($r)); $a->set_pager_itemspage(20); } @@ -373,16 +376,10 @@ function videos_content(App $a) { $videos = array(); - if (dbm::is_result($r)) { + 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'],