aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-03-23 19:56:10 -0700
committerfriendica <info@friendica.com>2015-03-23 19:56:10 -0700
commitc2acab21d44bfaa8e051a42a13b72c056c95b0a3 (patch)
tree9bed606355434db496ecca9aaca04fcac4993381 /include/text.php
parentd32f63df82de01f66d5babe932f20aed9a5b3ee2 (diff)
downloadvolse-hubzilla-c2acab21d44bfaa8e051a42a13b72c056c95b0a3.tar.gz
volse-hubzilla-c2acab21d44bfaa8e051a42a13b72c056c95b0a3.tar.bz2
volse-hubzilla-c2acab21d44bfaa8e051a42a13b72c056c95b0a3.zip
improve performance of the zotfeed queries
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/text.php b/include/text.php
index 86da3ee42..a21d8029f 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1855,9 +1855,13 @@ function check_webbie($arr) {
function ids_to_querystr($arr,$idx = 'id') {
$t = array();
- foreach($arr as $x)
- $t[] = $x[$idx];
-
+ if($arr) {
+ foreach($arr as $x) {
+ if(! in_array($x[$idx],$t)) {
+ $t[] = $x[$idx];
+ }
+ }
+ }
return(implode(',', $t));
}