' . inlineSVG(KIWIKI_IMAGES_PATH . 'edit.svg') .''; } } return $output; } /** * Go bottom button */ public static function html_bottombtn() { global $lang; return '' .''; } public static function tpl_aclinfo() { global $ID, $AUTH_ACL; if (auth_quickaclcheck($ID) == 0) return; // no rights to view, no rights to get this info $page_acls = array(); $namespaces = array(); $ns = getNS($ID); while ($ns) { array_unshift($namespaces,$ns . ':*'); $ns = getNS($ns); } array_unshift($namespaces,'*'); // root $namespaces[] = $ID; // check matches foreach ($namespaces as $level) { $matches = preg_grep('/^'.preg_quote($level,'/').'\s+\S+\s+\d+\s*$/',$AUTH_ACL); $this_acls = array(); foreach($matches as $match){ $match = preg_replace('/#.*$/','',$match); //ignore comments $acl = preg_split('/\s+/',$match); $this_acls[urldecode($acl[1])] = $acl[2]; if ($acl[1] == "@ALL") // overwrites stuff from upper level $page_acls = array(); } $page_acls = array_merge($page_acls,$this_acls); } // check if visible to everyone: if (($page_acls['@ALL'] !== false) && $page_acls['@ALL'] > 0) return; // page is visible to everyone $return = ""; $list = array(); foreach ($page_acls as $user => $right) { if ($right > 0 && $user != "@admin" ) // admins can see everything array_push($list,$user); } if (count($list)) { sort($list); $return = "(page visible to: "; $return .= join(', ',$list); $return .= ")"; } // Uncomment this, if you want to display users/groups who cannot access this page, too: $list = array(); foreach ($page_acls as $user => $right) { if ($right == 0) array_push($list,$user); } if (count($list)) { sort($list); $return .= "(page hidden to: "; $return .= join(', ',$list); $return .= ")"; } return $return; } }