From d4e9d5c7d1ec74172b46a130352a41765f1fec6a Mon Sep 17 00:00:00 2001
From: Andreas Gohr <andi@splitbrain.org>
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
---
 lib/plugins/syntax.php | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'lib/plugins/syntax.php')

diff --git a/lib/plugins/syntax.php b/lib/plugins/syntax.php
index 126e01952..633e001d2 100644
--- a/lib/plugins/syntax.php
+++ b/lib/plugins/syntax.php
@@ -36,7 +36,10 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode {
      * url    - Website with more information on the plugin (eg. syntax description)
      */
     function getInfo(){
-        trigger_error('getType() 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);
     }
 
     /**
-- 
cgit v1.2.3