diff options
author | Mario <mario@mariovavti.com> | 2024-02-25 19:29:50 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-02-25 19:29:50 +0000 |
commit | 3dd739424718596b94f5a61d2015388db2491999 (patch) | |
tree | 336e19816349b7b0c3d5c4ba49bf4bf19ae4e46a /Zotlabs/Widget/Pinned.php | |
parent | b860b730a9fe718ad35cd918ab237afe42cf386c (diff) | |
download | volse-hubzilla-3dd739424718596b94f5a61d2015388db2491999.tar.gz volse-hubzilla-3dd739424718596b94f5a61d2015388db2491999.tar.bz2 volse-hubzilla-3dd739424718596b94f5a61d2015388db2491999.zip |
AS2
Diffstat (limited to 'Zotlabs/Widget/Pinned.php')
-rw-r--r-- | Zotlabs/Widget/Pinned.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Zotlabs/Widget/Pinned.php b/Zotlabs/Widget/Pinned.php index 91a9f45b9..3c6484b36 100644 --- a/Zotlabs/Widget/Pinned.php +++ b/Zotlabs/Widget/Pinned.php @@ -225,39 +225,39 @@ class Pinned { private function activity($item, &$conv_responses) { foreach(array_keys($conv_responses) as $verb) { + $verb_sql = ''; switch($verb) { case 'like': - $v = ACTIVITY_LIKE; + $verb_sql = " AND verb IN ('Like', '" . ACTIVITY_LIKE . "') "; break; case 'dislike': - $v = ACTIVITY_DISLIKE; + $verb_sql = " AND verb IN ('Dislike', '" . ACTIVITY_DISLIKE . "') "; break; case 'agree': - $v = ACTIVITY_AGREE; + $verb_sql = " AND verb = '" . ACTIVITY_AGREE . "' "; break; case 'disagree': - $v = ACTIVITY_DISAGREE; + $verb_sql = " AND verb = '" . ACTIVITY_DISAGREE . "' "; break; case 'abstain': - $v = ACTIVITY_ABSTAIN; + $verb_sql = " AND verb = '" . ACTIVITY_ABSTAIN . "' "; break; case 'attendyes': - $v = ACTIVITY_ATTEND; + $verb_sql = " AND verb IN ('Accept', '" . ACTIVITY_ATTEND . "') "; break; case 'attendno': - $v = ACTIVITY_ATTENDNO; + $verb_sql = " AND verb IN ('Reject', '" . ACTIVITY_ATTENDNO . "') "; break; case 'attendmaybe': - $v = ACTIVITY_ATTENDMAYBE; + $verb_sql = " AND verb IN ('TentativeAccept', '" . ACTIVITY_ATTENDMAYBE . "') "; break; default: break; } - $r = q("SELECT * FROM item WHERE parent = %d AND id <> parent AND verb = '%s' AND item_deleted = 0", - intval($item['id']), - dbesc($v) + $r = q("SELECT * FROM item WHERE parent = %d AND id <> parent $verb_sql AND item_deleted = 0", + intval($item['id']) ); if(! $r) { unset($conv_responses[$verb]); |