|\})/",$match,$m) ){ $level = "nodisp_" . $this->getLevel($m[1]); return array($state,"
\n"); } return array($state, "
\n"); case DOKU_LEXER_UNMATCHED : return array($state, $match); case DOKU_LEXER_EXIT : return array($state, ''); } return array(); } /** * Create output */ function render($mode, Doku_Renderer $renderer, $data) { global $INFO; if($mode == 'xhtml'){ $renderer->nocache(); // disable caching list($state, $match) = $data; switch ($state) { case DOKU_LEXER_ENTER : if($INFO['isadmin'] || $INFO['ismanager'] ) break; $renderer->doc .= $match; break; case DOKU_LEXER_UNMATCHED : $renderer->doc .= $renderer->_xmlEntities($match); break; case DOKU_LEXER_EXIT : if($INFO['isadmin'] || $INFO['ismanager'] ) break; $renderer->doc .= "
"; break; } return true; } return false; } function getLevel($match) { global $INFO; if(is_numeric($match)) { return $match; } $user_groups = $INFO['userinfo']['grps']; if($user_groups && is_array($user_groups)) { if(in_array($match,$user_groups)) { return 16; } } return $match; } }