hlp = plugin_load('helper','publish'); } function register(&$controller) { if ($this->getConf('hide drafts')) { $controller->register_hook('TPL_ACT_RENDER', 'BEFORE', $this, 'hide', array()); } } /** * @param Doku_Event $event * @param array $param */ function hide(&$event, $param) { global $ID; global $REV; if ($this->hlp->isRevisionApproved($REV, $ID)) { return; } if (auth_quickaclcheck($ID) >= AUTH_EDIT) { return; } global $ACT; if (!in_array($ACT, array('show', 'edit', 'source', 'diff'))) { return; } $ACT = 'denied'; $event->preventDefault(); $event->stopPropagation(); print p_locale_xhtml('denied'); } }