From dfabb2233685be891929dd4065c257a025dc3151 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 4 Aug 2013 18:20:45 +0200 Subject: added tabURL builder --- lib/plugins/extension/helper/list.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php index ffb88114d..e8b4f472f 100644 --- a/lib/plugins/extension/helper/list.php +++ b/lib/plugins/extension/helper/list.php @@ -474,4 +474,24 @@ class helper_plugin_extension_list extends DokuWiki_Plugin { return ''; } + + /** + * Create an URL inside the extension manager + * + * @param string tab tb to load, empty for current tab + * @param array $params associative array of parameter to set + * @return string + */ + static public function tabURL($tab='', $params=array()){ + global $ID; + global $INPUT; + + if(!$tab) $tab = $INPUT->str('tab', 'installed', true); + $defaults = array( + 'do' => 'admin', + 'page' => 'extension', + 'tab' => $tab, + ); + return wl($ID, array_merge($defaults, $params)); + } } -- cgit v1.2.3