From e2660eaad3652a23d12f44959cbce998a949c372 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Fri, 2 Dec 2016 12:15:18 -0800 Subject: fix the forum widget for forums with custom perms --- include/text.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index 12b37222b..b25eb8e46 100644 --- a/include/text.php +++ b/include/text.php @@ -2049,7 +2049,7 @@ function ids_to_array($arr,$idx = 'id') { $t = array(); if($arr) { foreach($arr as $x) { - if(array_key_exists($idx,$x) && strlen($x[$idx]) && (! in_array($x[$idx],$t))) { + if(array_key_exists($idx,$x) && strlen($x[$idx]) && (! in_array($x[$idx],$t))) { $t[] = $x[$idx]; } } @@ -2060,12 +2060,15 @@ function ids_to_array($arr,$idx = 'id') { -function ids_to_querystr($arr,$idx = 'id') { +function ids_to_querystr($arr,$idx = 'id',$quote = false) { $t = array(); if($arr) { foreach($arr as $x) { if(! in_array($x[$idx],$t)) { - $t[] = $x[$idx]; + if($quote) + $t[] = "'" . dbesc($x[$idx]) . "'"; + else + $t[] = $x[$idx]; } } } -- cgit v1.2.3