From d4e9d5c7d1ec74172b46a130352a41765f1fec6a Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 11 Nov 2009 21:34:37 +0100 Subject: More flexible plugin packages FS#1746 Ignore-this: 252bb5a42965ed045221c0544136aa62 darcs-hash:20091111203437-7ad00-86f06d842b3bec22641a637cb09dbc666a42ca2d.gz --- inc/plugin.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'inc/plugin.php') diff --git a/inc/plugin.php b/inc/plugin.php index 54d2580e9..364534739 100644 --- a/inc/plugin.php +++ b/inc/plugin.php @@ -30,7 +30,10 @@ class DokuWiki_Plugin { * url - Website with more information on the plugin (eg. syntax description) */ function getInfo(){ - trigger_error('getInfo() not implemented in '.get_class($this), E_USER_WARNING); + $parts = explode('_',get_class($this)); + $info = DOKU_PLUGIN.'/'.$parts[2].'/plugin.info.txt'; + if(@file_exists($info)) return confToHash($info); + trigger_error('getInfo() not implemented in '.get_class($this).' and '.$info.' not found', E_USER_WARNING); } // plugin introspection methods -- cgit v1.2.3