use Friendica\Model\Queue;
use Friendica\Util\Network;
use Friendica\Model\User;
use Friendica\Model\Queue;
use Friendica\Util\Network;
use Friendica\Model\User;
logger('pumpio_send '.$username.': success '.$post_id);
if($post_id && $iscomment) {
logger('pumpio_send '.$username.': Update extid '.$post_id." for post id ".$b['id']);
logger('pumpio_send '.$username.': success '.$post_id);
if($post_id && $iscomment) {
logger('pumpio_send '.$username.': Update extid '.$post_id." for post id ".$b['id']);
- $r = q("UPDATE `item` SET `deleted` = 1, `unseen` = 1, `changed` = '%s' WHERE `verb` = '%s' AND `uid` = %d AND `contact-id` = %d AND `thr-parent` = '%s'",
- dbesc(Temporal::convert()),
- dbesc(ACTIVITY_LIKE),
- intval($uid),
- intval($contactid),
- dbesc($orig_post['uri'])
- );
+ Item::delete(["`verb` = ? AND `uid` = ? AND `contact-id` = ? AND `thr-parent` = ?", ACTIVITY_LIKE, $uid, $contactid, $orig_post['uri']]);
`location`, `about`, `writable`, `blocked`, `readonly`, `pending` )
VALUES (%d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', '%s', %d, 0, 0, 0)",
intval($uid),
`location`, `about`, `writable`, `blocked`, `readonly`, `pending` )
VALUES (%d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', '%s', %d, 0, 0, 0)",
intval($uid),
dbesc($contact->url),
dbesc(normalise_link($contact->url)),
dbesc(str_replace("acct:", "", $contact->id)),
dbesc($contact->url),
dbesc(normalise_link($contact->url)),
dbesc(str_replace("acct:", "", $contact->id)),
$r = q("SELECT * FROM `item` WHERE `extid` = '%s' AND `uid` = %d LIMIT 1",
dbesc($post->object->id),
$r = q("SELECT * FROM `item` WHERE `extid` = '%s' AND `uid` = %d LIMIT 1",
dbesc($post->object->id),
}
function pumpio_dopost(&$a, $client, $uid, $self, $post, $own_id, $threadcompletion = true) {
}
function pumpio_dopost(&$a, $client, $uid, $self, $post, $own_id, $threadcompletion = true) {
$postarray['body'] = share_header($share_author, $post->object->author->url,
$post->object->author->image->url, "",
$postarray['body'] = share_header($share_author, $post->object->author->url,
$post->object->author->image->url, "",
$postarray['body'] = "[share author='".$share_author.
"' profile='".$post->object->author->url.
"' avatar='".$post->object->author->image->url.
$postarray['body'] = "[share author='".$share_author.
"' profile='".$post->object->author->url.
"' avatar='".$post->object->author->image->url.
- "' posted='".Temporal::convert($post->object->created, 'UTC', 'UTC', ).
+ "' posted='".DateTimeFormat::convert($post->object->created, 'UTC', 'UTC', ).
- $r = q("UPDATE `item` SET `title` = '%s', `body` = '%s' , `changed` = '%s' WHERE `uri` = '%s' AND `uid` = %d",
- dbesc($postarray["title"]),
- dbesc($postarray["body"]),
- dbesc($postarray["edited"]),
- dbesc($postarray["uri"]),
- intval($uid)
- );
+ $fields = ['title' => $postarray["title"], 'body' => $postarray["body"], 'changed' => $postarray["edited"]];
+ $condition = ['uri' => $postarray["uri"], 'uid' => $uid];
+ Item::update($fields, $condition);
logger('pumpio_queue: send '.$username.': success '.$post_id);
if($post_id && $iscomment) {
logger('pumpio_send '.$username.': Update extid '.$post_id." for post id ".$z['item']);
logger('pumpio_queue: send '.$username.': success '.$post_id);
if($post_id && $iscomment) {
logger('pumpio_send '.$username.': Update extid '.$post_id." for post id ".$z['item']);