aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib/plugins/admin.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/plugins/admin.php')
-rw-r--r--lib/plugins/admin.php18
1 files changed, 6 insertions, 12 deletions
diff --git a/lib/plugins/admin.php b/lib/plugins/admin.php
index 4e1cbbb33..a1d99a412 100644
--- a/lib/plugins/admin.php
+++ b/lib/plugins/admin.php
@@ -2,17 +2,13 @@
/**
* Admin Plugin Prototype
*
- * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
- * @author Christopher Smith <chris@jalakai.co.uk>
- */
-// must be run within Dokuwiki
-if(!defined('DOKU_INC')) die();
-
-/**
* All DokuWiki plugins to extend the admin function
* need to inherit from this class
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Christopher Smith <chris@jalakai.co.uk>
*/
-class DokuWiki_Admin_Plugin extends DokuWiki_Plugin {
+abstract class DokuWiki_Admin_Plugin extends DokuWiki_Plugin {
/**
* Return the text that is displayed at the main admin menu
@@ -62,15 +58,13 @@ class DokuWiki_Admin_Plugin extends DokuWiki_Plugin {
* Carry out required processing
*/
public function handle() {
- trigger_error('handle() not implemented in '.get_class($this), E_USER_WARNING);
+ // some plugins might not need this
}
/**
* Output html of the admin page
*/
- public function html() {
- trigger_error('html() not implemented in '.get_class($this), E_USER_WARNING);
- }
+ abstract public function html();
/**
* Return true for access only by admins (config:superuser) or false if managers are allowed as well