*/ // must be run within Dokuwiki if (!defined('DOKU_INC')) die(); if (!defined('DOKU_LF')) define('DOKU_LF', "\n"); if (!defined('DOKU_TAB')) define('DOKU_TAB', "\t"); if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); require_once DOKU_PLUGIN.'admin.php'; class admin_plugin_toucher extends DokuWiki_Admin_Plugin { public function getMenuSort() { return 13; } public function forAdminOnly() { return $this->getConf('admin_only'); } function touchFiles() { touch(DOKU_CONF."local.php"); // this is the core of this plugin } public function handle() { global $INFO; if ($this->getConf('admin_only')) { if (!$INFO[isadmin]) { msg('Plugin toucher failed: you must be admin to touch configuration',-1); return false; } } $this->touchFiles(); msg('Plugin toucher touched configuration files',1); return true; } public function html() { ptln('

' . $this->getLang('menu') . '

'); ptln('

Configuration files have been just touched.

'); } } // vim:ts=4:sw=4:et: