logger('pumpio_send '.$username.': success '.$post_id);
if($post_id AND $iscomment) {
logger('pumpio_send '.$username.': Update extid '.$post_id." for post id ".$b['id']);
- q("UPDATE `item` SET `extid` = '%s' WHERE `id` = %d LIMIT 1",
+ q("UPDATE `item` SET `extid` = '%s' WHERE `id` = %d",
dbesc($post_id),
intval($b['id'])
);
`name-date` = '%s',
`uri-date` = '%s',
`avatar-date` = '%s'
- WHERE `id` = %d LIMIT 1
+ WHERE `id` = %d
",
dbesc($photos[0]),
dbesc($photos[1]),
`micro` = '%s',
`name-date` = '%s',
`uri-date` = '%s',
- `avatar-date` = '%s'
- WHERE `id` = %d LIMIT 1
+ `avatar-date` = '%s',
+ `name` = '%s',
+ `nick` = '%s'
+ WHERE `id` = %d
",
dbesc($photos[0]),
dbesc($photos[1]),
dbesc(datetime_convert()),
dbesc(datetime_convert()),
dbesc(datetime_convert()),
+ dbesc($contact->displayName),
+ dbesc($contact->preferredUsername),
intval($r[0]['id'])
);
}
logger('pumpio_queue: send '.$username.': success '.$post_id);
if($post_id AND $iscomment) {
logger('pumpio_send '.$username.': Update extid '.$post_id." for post id ".$z['item']);
- q("UPDATE `item` SET `extid` = '%s' WHERE `id` = %d LIMIT 1",
+ q("UPDATE `item` SET `extid` = '%s' WHERE `id` = %d",
dbesc($post_id),
intval($z['item'])
);
$msglink = $b["plink"];
// If the message is short enough then don't modify it. (if the link exists in the original message)
- if ((strlen(trim($origmsg)) <= $max_char) AND (strpos($origmsg, $msglink) OR ($msglink == "")))
+ if ((strlen(trim($origmsg)) <= $max_char) AND (($msglink == "") OR strpos($origmsg, $msglink)))
return(array("msg"=>trim($origmsg), "image"=>""));
// If the message is short enough and contains a picture then post the picture as well