From 0dc09ea238adf141d5a93fd1a734d6156c6e6ad3 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 5 May 2021 08:36:18 +0000 Subject: possible minor performance improvement --- Zotlabs/Module/Channel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Zotlabs/Module/Channel.php') diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php index ab5000b9a..a7deb4f6b 100644 --- a/Zotlabs/Module/Channel.php +++ b/Zotlabs/Module/Channel.php @@ -308,9 +308,9 @@ class Channel extends Controller { if (($update) && (!$load)) { if ($mid) { - $r = q("SELECT parent AS item_id from item where mid like '%s' and uid = %d $item_normal_update + $r = q("SELECT parent AS item_id from item where mid = '%s' and uid = %d $item_normal_update AND item_wall = 1 $simple_update $sql_extra limit 1", - dbesc($mid . '%'), + dbesc($mid), intval(App::$profile['profile_uid']) ); } @@ -356,9 +356,9 @@ class Channel extends Controller { if ($noscript_content || $load) { if ($mid) { - $r = q("SELECT parent AS item_id from item where mid like '%s' and uid = %d $item_normal + $r = q("SELECT parent AS item_id from item where mid = '%s' and uid = %d $item_normal AND item_wall = 1 $sql_extra limit 1", - dbesc($mid . '%'), + dbesc($mid), intval(App::$profile['profile_uid']) ); if (!$r) { -- cgit v1.2.3