hubzilla has uuid - use that instead of wildcard

This commit is contained in:
zotlabs 2019-02-19 13:36:53 -08:00
parent 72fd1cc5a6
commit 51e9f302b0

View File

@ -67,14 +67,14 @@ class Id extends Controller {
$sql_extra = item_permissions_sql(0);
$r = q("select * from item where mid like '%s' $item_normal $sql_extra and uid = %d limit 1",
dbesc('%/' . $item_id),
$r = q("select * from item where uuid = '%s' $item_normal $sql_extra and uid = %d limit 1",
dbesc($item_id),
intval($channel_id)
);
if(! $r) {
$r = q("select * from item where mid like '%s' $item_normal and uid = %d limit 1",
dbesc('%/' . $item_id),
$r = q("select * from item where uuid = '%s' $item_normal and uid = %d limit 1",
dbesc($item_id),
intval($channel_id)
);
if($r) {