diff options
author | Andreas Gohr <andi@splitbrain.org> | 2013-08-09 22:58:01 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2013-08-09 22:58:01 +0200 |
commit | 75e063084d865a011e074c29c5edb8569fe2cfe1 (patch) | |
tree | cc14ba78b947e8b0a48a1fc17404f2ac81f5c0ab /lib/plugins/extension/helper/gui.php | |
parent | 1e0eea17dc60dc6f5ec81ffcca313db353c88c44 (diff) | |
download | rpg-75e063084d865a011e074c29c5edb8569fe2cfe1.tar.gz rpg-75e063084d865a011e074c29c5edb8569fe2cfe1.tar.bz2 |
made info mechanism work again
Diffstat (limited to 'lib/plugins/extension/helper/gui.php')
-rw-r--r-- | lib/plugins/extension/helper/gui.php | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/lib/plugins/extension/helper/gui.php b/lib/plugins/extension/helper/gui.php index 57dfefab3..6a0cdb22e 100644 --- a/lib/plugins/extension/helper/gui.php +++ b/lib/plugins/extension/helper/gui.php @@ -17,7 +17,18 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { protected $tabs = array('plugins', 'templates', 'search', 'install'); /** @var string the extension that should have an open info window FIXME currently broken*/ - protected $infofor = ''; + protected $infoFor = ''; + + /** + * Constructor + * + * initializes requested info window + */ + public function __construct(){ + global $INPUT; + $this->infoFor = $INPUT->str('info'); + } + /** * display the plugin tab @@ -37,7 +48,7 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { $list->start_form(); foreach($pluginlist as $name) { $extension->setExtension($name); - $list->add_row($extension, $name == $this->infoFor); + $list->add_row($extension, $extension->getID() == $this->infoFor); } $list->end_form(); $list->render(); @@ -61,7 +72,7 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { $list->start_form(); foreach($tpllist as $name) { $extension->setExtension("template:$name"); - $list->add_row($extension, $name == $this->infoFor); + $list->add_row($extension, $extension->getID() == $this->infoFor); } $list->end_form(); $list->render(); @@ -93,7 +104,7 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { $list->start_form(); foreach($result as $name) { $extension->setExtension($name); - $list->add_row($extension, $name == $this->infoFor); + $list->add_row($extension, $extension->getID() == $this->infoFor); } $list->end_form(); $list->render(); @@ -149,12 +160,14 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin { */ public function tabURL($tab = '', $params = array(), $sep = '&') { global $ID; + global $INPUT; if(!$tab) $tab = $this->currentTab(); $defaults = array( 'do' => 'admin', 'page' => 'extension', 'tab' => $tab, + 'q' => $INPUT->str('q') ); return wl($ID, array_merge($defaults, $params), false, $sep); } |