X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fvideos.php;h=412966f862b7e3138085f9d92679377010054b2d;hb=de4a2e6fd03cd0aab94a256eba92ed593931534b;hp=88d35ea834c0d77aef4211e61001d946fac69fff;hpb=acb4630eed14175ef35f09e21609d6329f3f990c;p=friendica.git diff --git a/mod/videos.php b/mod/videos.php index 88d35ea834..412966f862 100644 --- a/mod/videos.php +++ b/mod/videos.php @@ -4,6 +4,8 @@ use Friendica\App; use Friendica\Core\Config; use Friendica\Core\System; use Friendica\Core\Worker; +use Friendica\Database\DBM; +use Friendica\Object\Contact; require_once('include/items.php'); require_once('include/acl_selectors.php'); @@ -38,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"); @@ -148,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) @@ -158,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()),
@@ -172,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);
 				}
 			}
 		}
@@ -268,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;
@@ -296,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;
 			}
@@ -356,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);
 	}
@@ -374,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'],