$condition = ["`guid` = ? AND (`uid` = ? OR `uid` = 0)", $args['guid'], local_user()];
$params = ['order' => ['uid' => true]];
- $item = Item::selectFirst(local_user(), Item::DISPLAY_FIELDLIST, $condition, $params);
+ $item = Item::selectFirstForUser(local_user(), [], $condition, $params);
if (!\Friendica\Database\DBM::is_result($item)) {
throw new HTTPException\NotFoundException(L10n::t('Unknown post with guid: %s', $args['guid']));
if (!$ms_item_id['message-id'] || !strlen($ms_item_id['message-id'])) {
logger('mailstream_cron: Item ' . $ms_item_id['id'] . ' URI ' . $ms_item_id['uri'] . ' has no message-id', LOGGER_NORMAL);
}
- $item = Item::selectFirst($ms_item_id['uid'], Item::DISPLAY_FIELDLIST, ['id' => $ms_item_id['id']]);
+ $item = Item::selectFirst([], ['id' => $ms_item_id['id']]);
$users = q("SELECT * FROM `user` WHERE `uid` = %d", intval($item['uid']));
$user = $users[0];
if ($user && $item) {
}
$condition = ['uri' => $b["thr-parent"], 'uid' => $b["uid"]];
- $orig_post = Item::selectFirst($b["uid"], ['author-link', 'uri'], $condition);
+ $orig_post = Item::selectFirst(['author-link', 'uri'], $condition);
if (!count($orig_post)) {
logger("statusnet_post_hook: no parent found " . $b["thr-parent"]);
return;
$item["plink"] = $a->get_baseurl() . "/display/" . $a->user["nickname"] . "/" . $item["parent"];
$condition = ['uri' => $item["thr-parent"], 'uid' => local_user()];
- $orig_post = Item::selectFirst(local_user(), ['author-link', 'uri'], $condition);
+ $orig_post = Item::selectFirst(['author-link', 'uri'], $condition);
if (count($orig_post)) {
$nick = preg_replace("=https?://(.*)/(.*)=ism", "$2", $orig_post["author-link"]);
}
$condition = ['uri' => $b["thr-parent"], 'uid' => $b["uid"]];
- $orig_post = Item::selectFirst($b["uid"], [], $condition);
+ $orig_post = Item::selectFirst([], $condition);
if (!DBM::is_result($orig_post)) {
logger("twitter_post_hook: no parent found " . $b["thr-parent"]);
return;
$item["plink"] = $a->get_baseurl() . "/display/" . $a->user["nickname"] . "/" . $item["parent"];
$condition = ['uri' => $item["thr-parent"], 'uid' => local_user()];
- $orig_post = Item::selectFirst(local_user(), ['author-link'], $condition);
+ $orig_post = Item::selectFirst(['author-link'], $condition);
if (DBM::is_result($orig_post)) {
$nicknameplain = preg_replace("=https?://twitter.com/(.*)=ism", "$1", $orig_post["author-link"]);
$nickname = "@[url=" . $orig_post["author-link"] . "]" . $nicknameplain . "[/url]";
$senditemtext = PConfig::get($rr['uid'], 'windowsphonepush', 'senditemtext');
if ($senditemtext == 1) {
// load item with the max id
- $item = Item::selectFirst(local_user(), ['author-name', 'body'], ['id' => $count[0]['max']]);
+ $item = Item::selectFirst(['author-name', 'body'], ['id' => $count[0]['max']]);
// as user allows to send the item, we want to show the sender of the item in the toast
// toasts are limited to one line, therefore place is limited - author shall be in