if(! function_exists('expand_acl')) {
function expand_acl($s) {
+ // turn string array of angle-bracketed elements into numeric array
+ // e.g. "<1><2><3>" => array(1,2,3);
+ $ret = array();
if(strlen($s)) {
- $a = explode('<',$s);
- for($x = 0; $x < count($a); $x ++) {
- $a[$x] = intval(str_replace(array('<','>'),array('',''),$a[$x]));
+ $t = str_replace('<','',$s);
+ $a = explode('>',$t);
+ foreach($a as $aa) {
+ if(intval($aa))
+ $ret[] = intval($aa);
}
- return $a;
}
- return array();
+ return $ret;
}}
if(! function_exists('sanitise_acl')) {
$recipients = array_unique(array_merge($recipients,$allow_people,$allow_groups),SORT_NUMERIC);
$deny = array_unique(array_merge($deny_people,$deny_groups),SORT_NUMERIC);
$recipients = array_diff($recipients,$deny);
-
+
$conversant_str = dbesc(implode(', ',$conversants));
}
}
}
- $atom .= "</feed>\r\n";
+ $atom .= '</feed>' . "\r\n";
if($debugging)
echo $atom;