aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/channel.php4
-rw-r--r--mod/network.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/mod/channel.php b/mod/channel.php
index c74b40c00..f3e247399 100644
--- a/mod/channel.php
+++ b/mod/channel.php
@@ -145,7 +145,7 @@ function channel_content(&$a, $update = 0, $load = false) {
if(($update) && (! $load)) {
- $r = q("SELECT distinct(parent) AS `item_id` from item
+ $r = q("SELECT distinct parent AS `item_id` from item
left join abook on item.author_xchan = abook.abook_xchan
WHERE uid = %d AND item_restrict = 0
AND (item_flags & %d) AND ( item_flags & %d )
@@ -178,7 +178,7 @@ function channel_content(&$a, $update = 0, $load = false) {
$pager_sql = sprintf(" LIMIT %d, %d ",intval($a->pager['start']), intval($a->pager['itemspage']));
if($load) {
- $r = q("SELECT id AS item_id FROM item
+ $r = q("SELECT distinct id AS item_id FROM item
left join abook on item.author_xchan = abook.abook_xchan
WHERE uid = %d AND item_restrict = 0
AND (item_flags & %d) and (item_flags & %d)
diff --git a/mod/network.php b/mod/network.php
index 837ac7aea..fb457a7f1 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -622,7 +622,7 @@ function network_content(&$a, $update = 0, $load = false) {
// Fetch a page full of parent items for this page
- $r = q("SELECT item.id AS item_id FROM item
+ $r = q("SELECT distinct item.id AS item_id FROM item
left join abook on item.author_xchan = abook.abook_xchan
WHERE item.uid = %d AND item.item_restrict = 0
AND item.parent = item.id