diff options
author | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2015-09-01 07:21:17 +0200 |
---|---|---|
committer | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2015-09-01 07:21:17 +0200 |
commit | 4fe3b5c6a62987189f4d29fba78c71f7df42791c (patch) | |
tree | 89f53893011a8d623d685067cbc52449e25926da /include/text.php | |
parent | 1b82fb7349a7a4048755d92e757efc5dc227b227 (diff) | |
parent | 417da13353431ddadafe661803115cf9dd9bf9ca (diff) | |
download | volse-hubzilla-4fe3b5c6a62987189f4d29fba78c71f7df42791c.tar.gz volse-hubzilla-4fe3b5c6a62987189f4d29fba78c71f7df42791c.tar.bz2 volse-hubzilla-4fe3b5c6a62987189f4d29fba78c71f7df42791c.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include/text.php')
-rw-r--r-- | include/text.php | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/include/text.php b/include/text.php index f27a9ce68..e4735ac48 100644 --- a/include/text.php +++ b/include/text.php @@ -458,63 +458,7 @@ function alt_pager(&$a, $i, $more = '', $less = '') { } -/** - * @brief Turn user/group ACLs stored as angle bracketed text into arrays. - * - * turn string array of angle-bracketed elements into string array - * e.g. "<123xyz><246qyo><sxo33e>" => array(123xyz,246qyo,sxo33e); - * - * @param string $s - * @return array - */ -function expand_acl($s) { - $ret = array(); - if(strlen($s)) { - $t = str_replace('<','',$s); - $a = explode('>',$t); - foreach($a as $aa) { - if($aa) - $ret[] = $aa; - } - } - - return $ret; -} - -/** - * @brief Used to wrap ACL elements in angle brackets for storage. - * - * @param[in,out] array &$item - */ -function sanitise_acl(&$item) { - if (strlen($item)) - $item = '<' . notags(trim($item)) . '>'; - else - unset($item); -} - -/** - * @brief Convert an ACL array to a storable string. - * - * @param array $p - * @return array - */ -function perms2str($p) { - $ret = ''; - - if (is_array($p)) - $tmp = $p; - else - $tmp = explode(',', $p); - - if (is_array($tmp)) { - array_walk($tmp, 'sanitise_acl'); - $ret = implode('', $tmp); - } - - return $ret; -} /** * @brief Generate a guaranteed unique (for this domain) item ID for ATOM. |