making tags work

This commit is contained in:
friendica
2012-07-09 22:08:25 -07:00
parent 8855cb9c28
commit 4b066e04f6
9 changed files with 163 additions and 76 deletions

View File

@@ -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();