1
1
Fork 0

The query after an API post was improved to make it faster.

This commit is contained in:
Michael Vogel 2015-01-31 23:13:21 +01:00
parent a7e190b0cb
commit 6eb4254d06

View file

@ -848,7 +848,7 @@
// get last public wall message
$lastwall = q("SELECT `item`.*, `i`.`contact-id` as `reply_uid`, `i`.`author-link` AS `item-author`
FROM `item`, `item` as `i`
WHERE `item`.`contact-id` = %d
WHERE `item`.`contact-id` = %d AND `item`.`uid` = %d
AND ((`item`.`author-link` IN ('%s', '%s')) OR (`item`.`owner-link` IN ('%s', '%s')))
AND `i`.`id` = `item`.`parent`
AND `item`.`type`!='activity'
@ -856,6 +856,7 @@
ORDER BY `item`.`created` DESC
LIMIT 1",
intval($user_info['cid']),
intval(api_user()),
dbesc($user_info['url']),
dbesc(normalise_link($user_info['url'])),
dbesc($user_info['url']),