From a2efa8069c9d579f39aa6368aa962a2921a57a1d Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 26 Feb 2021 21:27:57 +0200 Subject: [PATCH] allow to pass the tab as get parameter and passing config object to final_validation hook too --- admin/inc/class.admin_config.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/inc/class.admin_config.inc.php b/admin/inc/class.admin_config.inc.php index 22251689b1..9656225215 100644 --- a/admin/inc/class.admin_config.inc.php +++ b/admin/inc/class.admin_config.inc.php @@ -184,7 +184,7 @@ class admin_config isset($GLOBALS['egw_info']['server']['found_validation_hook']['final_validation']) && is_callable($func=$GLOBALS['egw_info']['server']['found_validation_hook']['final_validation'])) { - if (is_string($err=$func($_content['newsettings'])) || ($err=$GLOBALS['config_error'])) + if (is_string($err=$func($_content['newsettings'], $c)) || ($err=$GLOBALS['config_error'])) { $errors .= lang($err) . "\n"; $GLOBALS['config_error'] = False; @@ -266,8 +266,8 @@ class admin_config $tmpl = new Api\Etemplate($appname.'.config'); $path = (parse_url($tmpl->rel_path, PHP_URL_SCHEME) !== 'vfs' ? EGW_SERVER_ROOT : '').$tmpl->rel_path; $content = array( - 'tabs' => $_content['tabs'], - 'tabs2' => $_content['tabs2'], + 'tabs' => $_content['tabs'] ?: $_GET['tab'] ?? '', + 'tabs2' => $_content['tabs2'] ?: $_GET['tab'] ?? '', 'template' => $appname.'.config', 'newsettings' => array(), );