aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-12-02 19:22:19 +0000
committerMario <mario@mariovavti.com>2022-12-02 19:22:19 +0000
commit2bb58843ab303ba3e1a4a2c0c5a64138852ebbe0 (patch)
tree1e85f560122aae0b30dfe5a55c3de90fbce64ed1 /include/items.php
parentd16b6c3838cd76eb7ce336444cbd37774857b64f (diff)
downloadvolse-hubzilla-2bb58843ab303ba3e1a4a2c0c5a64138852ebbe0.tar.gz
volse-hubzilla-2bb58843ab303ba3e1a4a2c0c5a64138852ebbe0.tar.bz2
volse-hubzilla-2bb58843ab303ba3e1a4a2c0c5a64138852ebbe0.zip
move queueworker to core and bump version
Diffstat (limited to 'include/items.php')
-rw-r--r--include/items.php27
1 files changed, 15 insertions, 12 deletions
diff --git a/include/items.php b/include/items.php
index 752251a7e..73fd584e1 100644
--- a/include/items.php
+++ b/include/items.php
@@ -4124,21 +4124,24 @@ function posted_dates($uid,$wall) {
*/
function fetch_post_tags($items, $link = false) {
- $tag_finder = array();
- if($items) {
- foreach($items as $item) {
- if(is_array($item)) {
- if(array_key_exists('item_id',$item)) {
- if(! in_array($item['item_id'],$tag_finder))
- $tag_finder[] = $item['item_id'];
- }
- else {
- if(! in_array($item['id'],$tag_finder))
- $tag_finder[] = $item['id'];
- }
+ if (!is_array($items) || !$items) {
+ return $items;
+ }
+
+ $tag_finder = [];
+ foreach($items as $item) {
+ if(is_array($item)) {
+ if(array_key_exists('item_id',$item)) {
+ if(! in_array($item['item_id'],$tag_finder))
+ $tag_finder[] = $item['item_id'];
+ }
+ else {
+ if(! in_array($item['id'],$tag_finder))
+ $tag_finder[] = $item['id'];
}
}
}
+
$tag_finder_str = implode(', ', $tag_finder);
if(strlen($tag_finder_str)) {