aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-03-23 11:38:42 +0000
committerMario <mario@mariovavti.com>2021-03-24 20:48:42 +0100
commiteba69f85c778cd1217e0a6265f55d8cce2b0edc7 (patch)
treeb7645c5fc9aec3b3d671c5e4c552ffad015a97d5
parent14186f5c1811765133f0d1c04568f87e56aab9c4 (diff)
downloadvolse-hubzilla-eba69f85c778cd1217e0a6265f55d8cce2b0edc7.tar.gz
volse-hubzilla-eba69f85c778cd1217e0a6265f55d8cce2b0edc7.tar.bz2
volse-hubzilla-eba69f85c778cd1217e0a6265f55d8cce2b0edc7.zip
more work on mod display
(cherry picked from commit 2d716b74b9a879cbeaa8a3208dd6be2516b21fe7)
-rw-r--r--Zotlabs/Module/Display.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/Zotlabs/Module/Display.php b/Zotlabs/Module/Display.php
index 1aac7e328..62e7dbf8a 100644
--- a/Zotlabs/Module/Display.php
+++ b/Zotlabs/Module/Display.php
@@ -258,14 +258,13 @@ class Display extends \Zotlabs\Web\Controller {
$r = null;
if(local_channel()) {
- $r = q("SELECT item.id AS item_id FROM item WHERE uid IN (%d, %d) AND mid = '%s' $item_normal LIMIT 1",
+ $r = q("SELECT item.id AS item_id FROM item WHERE uid = %d AND mid = '%s' $item_normal LIMIT 1",
intval(local_channel()),
- intval($sys_id),
dbesc($target_item['parent_mid'])
);
}
- if($r === null) {
+ if(!$r) {
$r = q("SELECT item.id AS item_id FROM item
WHERE ((mid = '%s'
AND (((( item.allow_cid = '' AND item.allow_gid = '' AND item.deny_cid = ''
@@ -292,18 +291,17 @@ class Display extends \Zotlabs\Web\Controller {
$r = null;
if(local_channel()) {
$r = q("SELECT item.parent AS item_id from item
- WHERE uid IN (%d, %d)
+ WHERE uid = %d
AND parent_mid = '%s'
$item_normal_update
$simple_update
LIMIT 1",
intval(local_channel()),
- intval($sys_id),
dbesc($target_item['parent_mid'])
);
}
- if($r === null) {
+ if(! $r) {
$r = q("SELECT item.id as item_id from item
WHERE ((parent_mid = '%s'
AND (((( item.allow_cid = '' AND item.allow_gid = '' AND item.deny_cid = ''