aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-12-02 12:15:18 -0800
committerzotlabs <mike@macgirvin.com>2016-12-02 12:15:18 -0800
commite2660eaad3652a23d12f44959cbce998a949c372 (patch)
treedb49edd9c7ea14a26ea813d041fe4ec101913a83 /include/text.php
parent5b6e731f37dada4cd5b089af8134206ac22369ab (diff)
downloadvolse-hubzilla-e2660eaad3652a23d12f44959cbce998a949c372.tar.gz
volse-hubzilla-e2660eaad3652a23d12f44959cbce998a949c372.tar.bz2
volse-hubzilla-e2660eaad3652a23d12f44959cbce998a949c372.zip
fix the forum widget for forums with custom perms
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php9
1 files changed, 6 insertions, 3 deletions
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];
}
}
}