*/ // must be run within Dokuwiki if(!defined('DOKU_INC')) die(); class admin_plugin_autologoff extends DokuWiki_Admin_Plugin { /** @var helper_plugin_autologoff */ private $helper; public function __construct(){ $this->helper = $this->loadHelper('autologoff', false); } /** * @return int sort number in admin menu */ public function getMenuSort() { return 500; } /** * @return bool true if only access for superuser, false is for superusers and moderators */ public function forAdminOnly() { return false; } /** * Should carry out any processing required by the plugin. */ public function handle() { if(isset($_REQUEST['remove']) && checkSecurityToken()){ $this->helper->remove_entry($_REQUEST['remove']); } if(isset($_REQUEST['usergroup']) && checkSecurityToken()){ $this->helper->add_entry($_REQUEST['usergroup'], $_REQUEST['time']); } } /** * Render HTML output, e.g. helpful text and a form */ public function html() { echo $this->locale_xhtml('intro'); $config = $this->helper->load_config(); echo '
'; } } // vim:ts=4:sw=4:et: