aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-03-22 15:38:00 -0700
committerMario Vavti <mario@mariovavti.com>2018-04-05 09:28:05 +0200
commit9c512bb645e3b8874d4f7f2a8fc65de6ab3810b9 (patch)
treee54f136d16bcb692938c2b92999fca1bfde4b03c
parentae9e64cedfdf802d7234b2744bad375f4c804d3d (diff)
downloadvolse-hubzilla-9c512bb645e3b8874d4f7f2a8fc65de6ab3810b9.tar.gz
volse-hubzilla-9c512bb645e3b8874d4f7f2a8fc65de6ab3810b9.tar.bz2
volse-hubzilla-9c512bb645e3b8874d4f7f2a8fc65de6ab3810b9.zip
hubzilla issue #1013 - comments not displayed in single card/article view
-rw-r--r--Zotlabs/Module/Articles.php5
-rw-r--r--Zotlabs/Module/Cards.php5
2 files changed, 6 insertions, 4 deletions
diff --git a/Zotlabs/Module/Articles.php b/Zotlabs/Module/Articles.php
index e2e0fed5d..81f7b6543 100644
--- a/Zotlabs/Module/Articles.php
+++ b/Zotlabs/Module/Articles.php
@@ -129,19 +129,20 @@ class Articles extends \Zotlabs\Web\Controller {
$sql_extra = item_permissions_sql($owner);
+ $sql_item = '';
if($selected_card) {
$r = q("select * from iconfig where iconfig.cat = 'system' and iconfig.k = 'ARTICLE' and iconfig.v = '%s' limit 1",
dbesc($selected_card)
);
if($r) {
- $sql_extra .= "and item.id = " . intval($r[0]['iid']) . " ";
+ $sql_item = "and item.id = " . intval($r[0]['iid']) . " ";
}
}
$r = q("select * from item
where item.uid = %d and item_type = %d
- $sql_extra order by item.created desc",
+ $sql_extra $sql_item order by item.created desc",
intval($owner),
intval(ITEM_TYPE_ARTICLE)
);
diff --git a/Zotlabs/Module/Cards.php b/Zotlabs/Module/Cards.php
index f87988183..1bcd88a33 100644
--- a/Zotlabs/Module/Cards.php
+++ b/Zotlabs/Module/Cards.php
@@ -132,19 +132,20 @@ class Cards extends \Zotlabs\Web\Controller {
$sql_extra = item_permissions_sql($owner);
+ $sql_item = '';
if($selected_card) {
$r = q("select * from iconfig where iconfig.cat = 'system' and iconfig.k = 'CARD' and iconfig.v = '%s' limit 1",
dbesc($selected_card)
);
if($r) {
- $sql_extra .= "and item.id = " . intval($r[0]['iid']) . " ";
+ $sql_item = "and item.id = " . intval($r[0]['iid']) . " ";
}
}
$r = q("select * from item
where uid = %d and item_type = %d
- $sql_extra order by item.created desc",
+ $sql_extra $sql_item order by item.created desc",
intval($owner),
intval(ITEM_TYPE_CARD)
);