]> git.mxchange.org Git - friendica.git/blobdiff - include/conversation.php
Add defuse/php-encryption 2.0 to Composer dependencies
[friendica.git] / include / conversation.php
index bc227d97729fb0ac1a2251f2bab3ce48e310f3eb..0e814c6665d394ecf6b75575c4b5c6724f0e8cc9 100644 (file)
@@ -1,7 +1,10 @@
 <?php
 
 use Friendica\App;
+use Friendica\Core\Config;
+use Friendica\Core\PConfig;
 use Friendica\Core\System;
+use Friendica\Database\DBM;
 
 require_once "include/bbcode.php";
 require_once "include/acl_selectors.php";
@@ -120,7 +123,7 @@ function localize_item(&$item) {
                        WHERE `item`.`contact-id`=`contact`.`id`
                        AND `item`.`uri`='%s'",
                        dbesc($item['parent-uri']));
-               if (!dbm::is_result($r)) {
+               if (!DBM::is_result($r)) {
                        return;
                }
                $obj = $r[0];
@@ -271,7 +274,7 @@ function localize_item(&$item) {
                        AND `item`.`uri`='%s'",
                        dbesc($item['parent-uri']));
 
-               if (!dbm::is_result($r)) {
+               if (!DBM::is_result($r)) {
                        return;
                }
 
@@ -327,7 +330,7 @@ function localize_item(&$item) {
                                        intval($item['uid'])
                        );
 
-                       if (dbm::is_result($r) && $r[0]['plink']) {
+                       if (DBM::is_result($r) && $r[0]['plink']) {
                                $target = $r[0];
                                $Bname = $target['author-name'];
                                $Blink = $target['author-link'];
@@ -517,7 +520,7 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
        $arr_blocked = null;
 
        if (local_user()) {
-               $str_blocked = get_pconfig(local_user(), 'system', 'blocked');
+               $str_blocked = PConfig::get(local_user(), 'system', 'blocked');
                if ($str_blocked) {
                        $arr_blocked = explode(',', $str_blocked);
                        for ($x = 0; $x < count($arr_blocked); $x ++) {
@@ -939,7 +942,7 @@ function best_link_url($item, &$sparkle, $url = '') {
                $r = dba::select('contact', array('id'),
                        array('network' => NETWORK_DFRN, 'uid' => local_user(), 'nurl' => normalise_link($clean_url), 'pending' => false),
                        array('limit' => 1));
-               if (dbm::is_result($r)) {
+               if (DBM::is_result($r)) {
                        $best_url = 'redir/' . $r['id'];
                        $sparkle = true;
                        if ($url != '') {
@@ -990,7 +993,7 @@ function item_photo_menu($item) {
        $network = '';
        $rel = 0;
        $r = dba::select('contact', array('id', 'network', 'rel'), array('uid' => local_user(), 'nurl' => normalise_link($item['author-link'])), array('limit' => 1));
-       if (dbm::is_result($r)) {
+       if (DBM::is_result($r)) {
                $cid = $r['id'];
                $network = $r['network'];
                $rel = $r['rel'];
@@ -1363,7 +1366,7 @@ function get_item_children($arr, $parent) {
        $a = get_app();
        foreach ($arr as $item) {
                if ($item['id'] != $item['parent']) {
-                       if (get_config('system', 'thread_allow') && $a->theme_thread_allow) {
+                       if (Config::get('system', 'thread_allow') && $a->theme_thread_allow) {
                                // Fallback to parent-uri if thr-parent is not set
                                $thr_parent = $item['thr-parent'];
                                if ($thr_parent == '') {