]> git.mxchange.org Git - friendica.git/blobdiff - mod/videos.php
Merge pull request #3921 from MrPetovan/issue/3878-move-Contact-to-src
[friendica.git] / mod / videos.php
index 88d35ea834c0d77aef4211e61001d946fac69fff..9f02441020b1aacd438b69805fc655e1dd89c883 100644 (file)
@@ -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 "<pre>"; 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,7 +376,7 @@ 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']);