use Friendica\App;
use Friendica\Core\Config;
use Friendica\Core\System;
-use Friendica\Protocol\Dfrn;
+use Friendica\Database\DBM;
+use Friendica\Protocol\DFRN;
function display_init(App $a) {
`author-avatar`, `network`, `body`, `uid`, `owner-link`
FROM `item` WHERE `visible` AND NOT `deleted` AND NOT `moderated`
AND `guid` = ? AND `uid` = ? LIMIT 1", $a->argv[1], local_user());
- if (dbm::is_result($r)) {
+ if (DBM::is_result($r)) {
$nick = $a->user["nickname"];
$itemuid = local_user();
}
}
// Is it an item with uid=0?
- if (!dbm::is_result($r)) {
+ if (!DBM::is_result($r)) {
$r = dba::fetch_first("SELECT `id`, `parent`, `author-name`, `author-link`,
`author-avatar`, `network`, `body`, `uid`, `owner-link`
FROM `item` WHERE `visible` AND NOT `deleted` AND NOT `moderated`
}
// Or is it anywhere on the server?
- if (!dbm::is_result($r)) {
+ if (!DBM::is_result($r)) {
$r = dba::fetch_first("SELECT `item`.`id`, `item`.`parent`, `item`.`author-name`, `item`.`author-link`,
`item`.`author-avatar`, `item`.`network`, `item`.`body`, `item`.`uid`, `item`.`owner-link`
FROM `item` STRAIGHT_JOIN `user` ON `user`.`uid` = `item`.`uid`
AND `item`.`guid` = ? LIMIT 1", $a->argv[1]);
}
- if (dbm::is_result($r)) {
+ if (DBM::is_result($r)) {
if (strstr($_SERVER['HTTP_ACCEPT'], 'application/atom+xml')) {
logger('Directly serving XML for id '.$r["id"], LOGGER_DEBUG);
WHERE `user`.`nickname` = ? AND `profile`.`is-default` AND `contact`.`self` LIMIT 1",
$nickname
);
- if (dbm::is_result($r)) {
+ if (DBM::is_result($r)) {
$profiledata = $r;
}
$profiledata["network"] = NETWORK_DFRN;
$r = dba::fetch_first("SELECT `id`, `parent` FROM `item`
WHERE `item`.`visible` AND NOT `item`.`deleted` AND NOT `item`.`moderated`
AND `guid` = ? AND `uid` = ?", $a->argv[1], local_user());
- if (dbm::is_result($r)) {
+ if (DBM::is_result($r)) {
$item_id = $r["id"];
$item_parent = $r["parent"];
$nick = $a->user["nickname"];
AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = ''
AND NOT `item`.`private` AND NOT `user`.`hidewall`
AND `item`.`guid` = ?", $a->argv[1]);
- if (dbm::is_result($r)) {
+ if (DBM::is_result($r)) {
$item_id = $r["id"];
$item_parent = $r["parent"];
$nick = $r["nickname"];
AND `item`.`deny_cid` = '' AND `item`.`deny_gid` = ''
AND NOT `item`.`private` AND `item`.`uid` = 0
AND `item`.`guid` = ?", $a->argv[1]);
- if (dbm::is_result($r)) {
+ if (DBM::is_result($r)) {
$item_id = $r["id"];
$item_parent = $r["parent"];
}
if ($item_id && !is_numeric($item_id)) {
$r = dba::select('item', array('id', 'parent'), array('uri' => $item_id, 'uid' => $a->profile['uid']), array('limit' => 1));
- if (dbm::is_result($r)) {
+ if (DBM::is_result($r)) {
$item_id = $r["id"];
$item_parent = $r["parent"];
} else {
$contact_id,
$a->profile['uid']
);
- if (dbm::is_result($r)) {
+ if (DBM::is_result($r)) {
$contact = $r;
$remote_contact = true;
}
}
$r = dba::fetch_first("SELECT * FROM `contact` WHERE `uid` = ? AND `self` LIMIT 1", $a->profile['uid']);
- if (dbm::is_result($r)) {
+ if (DBM::is_result($r)) {
$a->page_contact = $r;
}
$is_owner = ((local_user()) && (local_user() == $a->profile['profile_uid']) ? true : false);
$item_id
);
- if (!dbm::is_result($r) && local_user()) {
+ if (!DBM::is_result($r) && local_user()) {
// Check if this is another person's link to a post that we have
$r = dba::fetch_first("SELECT `item`.uri FROM `item`
WHERE (`item`.`id` = ? OR `item`.`uri` = ?)
$item_id,
$item_id
);
- if (dbm::is_result($r)) {
+ if (DBM::is_result($r)) {
$item_uri = $r['uri'];
$r = dba::p(item_query()." AND `item`.`uid` = ?
}
}
- if (dbm::is_result($r)) {
+ if (DBM::is_result($r)) {
$s = dba::inArray($r);
if ((local_user()) && (local_user() == $a->profile['uid'])) {
$unseen = dba::select('item', array('id'), array('parent' => $s[0]['parent'], 'unseen' => true), array('limit' => 1));
- if (dbm::is_result($unseen)) {
+ if (DBM::is_result($unseen)) {
dba::update('item', array('unseen' => false), array('parent' => $s[0]['parent'], 'unseen' => true));
}
}
$item_id,
$item_id
);
- if (dbm::is_result($r)) {
+ if (DBM::is_result($r)) {
if ($r['deleted']) {
notice(t('Item has been removed.') . EOL);
} else {
}
function displayShowFeed($item_id, $conversation) {
- $xml = Dfrn::itemFeed($item_id, $conversation);
+ $xml = DFRN::itemFeed($item_id, $conversation);
if ($xml == '') {
http_status_exit(500);
}