]> git.mxchange.org Git - friendica.git/blobdiff - include/conversation.php
Merge pull request #3879 from zeroadam/Remove-Includes-#3873
[friendica.git] / include / conversation.php
index 184d8b911255bc984fa9549d6fcc950ae85e8608..d4fc2a40e599ac5b720846fe338fa601aad83158 100644 (file)
@@ -1,6 +1,8 @@
 <?php
 
 use Friendica\App;
+use Friendica\Core\Config;
+use Friendica\Core\PConfig;
 use Friendica\Core\System;
 
 require_once "include/bbcode.php";
@@ -470,7 +472,7 @@ These Fields are not added below (yet). They are here to for bug search.
                `event`.`summary` AS `event-summary`,`event`.`desc` AS `event-desc`,
                `event`.`location` AS `event-location`, `event`.`type` AS `event-type`,
                `event`.`nofinish` AS `event-nofinish`,`event`.`adjust` AS `event-adjust`,
-               `event`.`ignore` AS `event-ignore`";
+               `event`.`ignore` AS `event-ignore`, `event`.`id` AS `event-id`";
 }
 
 /**
@@ -517,7 +519,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 ++) {
@@ -800,6 +802,7 @@ function conversation(App $a, $items, $mode, $update, $preview = false) {
                                $tmp_item = array(
                                        'template' => $tpl,
                                        'id' => (($preview) ? 'P0' : $item['item_id']),
+                                       'guid' => (($preview) ? 'Q0' : $item['guid']),
                                        'network' => $item['item_network'],
                                        'network_name' => network_to_name($item['item_network'], $profile_link),
                                        'linktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['author-link'])) ? $item['author-link'] : $item['url'])),
@@ -1362,7 +1365,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 == '') {