aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-01-23 08:46:18 +0000
committerMario <mario@mariovavti.com>2024-01-23 08:46:18 +0000
commitf13af0f60b6bc91eab724fbd22387831736e0567 (patch)
treed99b496d77bba6e45e24613df988744c15a87369
parent651a28814815196c1aed2d6bc1adb99fd642c6f0 (diff)
downloadvolse-hubzilla-f13af0f60b6bc91eab724fbd22387831736e0567.tar.gz
volse-hubzilla-f13af0f60b6bc91eab724fbd22387831736e0567.tar.bz2
volse-hubzilla-f13af0f60b6bc91eab724fbd22387831736e0567.zip
process source xchan in xchan_query()
-rw-r--r--include/text.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/text.php b/include/text.php
index c6b2bed78..41fb11ba2 100644
--- a/include/text.php
+++ b/include/text.php
@@ -2616,7 +2616,7 @@ function trim_and_unpunify($s) {
* @param number $effective_uid
*/
function xchan_query(&$items, $abook = true, $effective_uid = 0) {
- $arr = array();
+ $arr = [];
if($items && count($items)) {
if($effective_uid) {
@@ -2631,6 +2631,8 @@ function xchan_query(&$items, $abook = true, $effective_uid = 0) {
$arr[] = "'" . dbesc($item['owner_xchan']) . "'";
if($item['author_xchan'] && (! in_array("'" . dbesc($item['author_xchan']) . "'",$arr)))
$arr[] = "'" . dbesc($item['author_xchan']) . "'";
+ if($item['source_xchan'] && (! in_array("'" . dbesc($item['source_xchan']) . "'",$arr)))
+ $arr[] = "'" . dbesc($item['source_xchan']) . "'";
}
}
if(count($arr)) {
@@ -2654,6 +2656,7 @@ function xchan_query(&$items, $abook = true, $effective_uid = 0) {
for($x = 0; $x < count($items); $x ++) {
$items[$x]['owner'] = find_xchan_in_array($items[$x]['owner_xchan'],$chans);
$items[$x]['author'] = find_xchan_in_array($items[$x]['author_xchan'],$chans);
+ $items[$x]['source'] = find_xchan_in_array($items[$x]['source_xchan'],$chans);
}
}
}