aboutsummaryrefslogtreecommitdiffstats
path: root/mod/content.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-07-09 23:23:20 -0700
committerfriendica <info@friendica.com>2012-07-09 23:23:20 -0700
commit1215de575d9cda66b434f21dafdf44f986638b71 (patch)
tree6bc706e2b5575c537ba41c1c511c5ac21c169d70 /mod/content.php
parent5355193b6342910ec69ec172846027ac9353d2b3 (diff)
downloadvolse-hubzilla-1215de575d9cda66b434f21dafdf44f986638b71.tar.gz
volse-hubzilla-1215de575d9cda66b434f21dafdf44f986638b71.tar.bz2
volse-hubzilla-1215de575d9cda66b434f21dafdf44f986638b71.zip
slider
Diffstat (limited to 'mod/content.php')
-rw-r--r--mod/content.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/mod/content.php b/mod/content.php
index 01856d88d..369f2fce2 100644
--- a/mod/content.php
+++ b/mod/content.php
@@ -278,7 +278,19 @@ function content_content(&$a, $update = 0) {
$second = dba_timer();
- $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();