aboutsummaryrefslogtreecommitdiffstats
path: root/mod/network.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-07-09 22:08:25 -0700
committerfriendica <info@friendica.com>2012-07-09 22:08:25 -0700
commit4b066e04f619c2c6f8d383daee9ceab49f39acdc (patch)
treec9f3376ffce342333b60d848430ee13b3329d903 /mod/network.php
parent8855cb9c286eb66ad96b3388d85ccc57434a6db3 (diff)
downloadvolse-hubzilla-4b066e04f619c2c6f8d383daee9ceab49f39acdc.tar.gz
volse-hubzilla-4b066e04f619c2c6f8d383daee9ceab49f39acdc.tar.bz2
volse-hubzilla-4b066e04f619c2c6f8d383daee9ceab49f39acdc.zip
making tags work
Diffstat (limited to 'mod/network.php')
-rw-r--r--mod/network.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/mod/network.php b/mod/network.php
index 35a981512..5ce7a9b57 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -643,7 +643,20 @@ function network_content(&$a, $update = 0) {
dbesc($parents_str)
);
- $items = conv_sort($items,$ordering);
+ $tag_finder = array();
+ if(count($items))
+ foreach($items as $item)
+ if(! in_array($item['item_id'],$tag_finder))
+ $tag_finder[] = $item['item_id'];
+ $tag_finder_str = implode(', ', $tag_finder);
+
+ $tags = q("select * from term where oid in ( %s ) and otype = %d",
+ dbesc($tag_finder_str),
+ intval(TERM_OBJ_POST)
+ );
+
+ $items = conv_sort($items,$tags,$ordering);
+
} else {
$items = array();