]> git.mxchange.org Git - friendica.git/blobdiff - mod/videos.php
Add Contact Object
[friendica.git] / mod / videos.php
index c75e8b943f85bd3933d413e1b0b47926c92021cb..662da4ca4beca3b23ed9584242faa7a48425a3b5 100644 (file)
@@ -1,8 +1,11 @@
 <?php
 
 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');
@@ -15,7 +18,7 @@ function videos_init(App $a) {
        if($a->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;
        }
 
@@ -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 "<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()),
@@ -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,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']);