diff options
author | sembrestels <sembrestels@riseup.net> | 2011-10-13 02:39:43 +0200 |
---|---|---|
committer | sembrestels <sembrestels@riseup.net> | 2011-10-13 02:39:43 +0200 |
commit | 090e2188026c76ac396c919b27404dc7cb110bf8 (patch) | |
tree | 9f7f3a1278aa0a09f168abdc0db98f7de1788870 /lib/dokuwiki/inc/pluginutils.php | |
download | elgg-090e2188026c76ac396c919b27404dc7cb110bf8.tar.gz elgg-090e2188026c76ac396c919b27404dc7cb110bf8.tar.bz2 |
Dokuwiki module for Elgg 1.7
Diffstat (limited to 'lib/dokuwiki/inc/pluginutils.php')
-rw-r--r-- | lib/dokuwiki/inc/pluginutils.php | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/lib/dokuwiki/inc/pluginutils.php b/lib/dokuwiki/inc/pluginutils.php new file mode 100644 index 000000000..8294d1ec8 --- /dev/null +++ b/lib/dokuwiki/inc/pluginutils.php @@ -0,0 +1,47 @@ +<?php +/** + * Utilities for handling plugins + * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * @author Andreas Gohr <andi@splitbrain.org> + */ + +// plugin related constants +if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); +require_once(DOKU_INC.'inc/plugincontroller.class.php'); + +$plugin_types = array('admin','syntax','action','renderer', 'helper'); + +global $plugin_controller_class, $plugin_controller; +if (empty($plugin_controller_class)) $plugin_controller_class = 'Doku_Plugin_Controller'; + +$plugin_controller = new $plugin_controller_class(); + +/** + * Original plugin functions, remain for backwards compatibility + */ +function plugin_list($type='',$all=false) { + global $plugin_controller; + return $plugin_controller->getList($type,$all); +} +function &plugin_load($type,$name,$new=false) { + global $plugin_controller; + return $plugin_controller->load($type,$name,$new); +} +function plugin_isdisabled($plugin) { + global $plugin_controller; + return $plugin_controller->isdisabled($plugin); +} +function plugin_enable($plugin) { + global $plugin_controller; + return $plugin_controller->enable($plugin); +} +function plugin_disable($plugin) { + global $plugin_controller; + return $plugin_controller->disable($plugin); +} +function plugin_directory($plugin) { + global $plugin_controller; + return $plugin_controller->get_directory($plugin); +} + |