<?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";
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];
AND `item`.`uri`='%s'",
dbesc($item['parent-uri']));
- if (!dbm::is_result($r)) {
+ if (!DBM::is_result($r)) {
return;
}
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'];
$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 ++) {
$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'])),
$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 != '') {
$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'];
$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 == '') {