aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-03-18 19:06:05 -0700
committerfriendica <info@friendica.com>2015-03-18 19:06:05 -0700
commit63683734a21e90149c464f7e9b03e7aedc29868e (patch)
tree5b58e4d227da6638f7a841a5b62a080646e53bba /mod
parent5a7e35fbf8e70f04e4253e5cc2a79925cd3385d1 (diff)
downloadvolse-hubzilla-63683734a21e90149c464f7e9b03e7aedc29868e.tar.gz
volse-hubzilla-63683734a21e90149c464f7e9b03e7aedc29868e.tar.bz2
volse-hubzilla-63683734a21e90149c464f7e9b03e7aedc29868e.zip
make the channel item query match recent changes to network item query (and some slightly older changes in display item query), and allow '@' in linkified urls.
Diffstat (limited to 'mod')
-rw-r--r--mod/channel.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/mod/channel.php b/mod/channel.php
index 2a0373a81..9df400cbe 100644
--- a/mod/channel.php
+++ b/mod/channel.php
@@ -149,17 +149,19 @@ function channel_content(&$a, $update = 0, $load = false) {
$page_mode = 'client';
+ $abook_uids = " and abook.abook_channel = " . intval($a->profile['profile_uid']) . " ";
+
if(($update) && (! $load)) {
if ($mid) {
- $r = q("SELECT parent AS item_id from item where mid = '%s' and uid = %d AND item_restrict = 0
+ $r = q("SELECT parent AS item_id from item where mid like '%s' and uid = %d AND item_restrict = 0
AND (item_flags & %d) > 0 AND item_unseen = 1 $sql_extra limit 1",
- dbesc($mid),
+ dbesc($mid . '%'),
intval($a->profile['profile_uid']),
intval(ITEM_WALL)
);
} else {
$r = q("SELECT distinct parent AS `item_id`, created from item
- left join abook on item.author_xchan = abook.abook_xchan
+ left join abook on ( item.owner_xchan = abook.abook_xchan $abook_uids )
WHERE uid = %d AND item_restrict = 0
AND (item_flags & %d) > 0 AND item_unseen = 1
AND ((abook.abook_flags & %d) = 0 or abook.abook_flags is null)