diff --git a/admin/inc/class.uiconfig.inc.php b/admin/inc/class.uiconfig.inc.php index ad46f3b5a6..2fa6ba6ceb 100644 --- a/admin/inc/class.uiconfig.inc.php +++ b/admin/inc/class.uiconfig.inc.php @@ -35,13 +35,12 @@ $_redir = $referer ? $referer : $GLOBALS['phpgw']->link('/admin/index.php'); } - switch($GLOBALS['HTTP_GET_VARS']['appname']) + $appname = $GLOBALS['HTTP_GET_VARS']['appname']; + switch($appname) { case 'admin': - case 'preferences': - $appname = 'preferences'; - $config_appname = 'phpgwapi'; - break; + //case 'preferences': + //$appname = 'preferences'; case 'addressbook': case 'calendar': case 'email': @@ -50,7 +49,6 @@ Other special apps can go here for now, e.g.: case 'bogusappname': */ - $appname = $GLOBALS['HTTP_GET_VARS']['appname']; $config_appname = 'phpgwapi'; break; case 'phpgwapi': @@ -59,7 +57,6 @@ Header('Location: ' . $_redir); break; default: - $appname = $GLOBALS['HTTP_GET_VARS']['appname']; $config_appname = $appname; break; } diff --git a/admin/inc/hook_config.inc.php b/admin/inc/hook_config.inc.php index 1705e7945b..0c00cf4bbe 100644 --- a/admin/inc/hook_config.inc.php +++ b/admin/inc/hook_config.inc.php @@ -12,112 +12,17 @@ /* $Id$ */ - function encryptalgo($config) + function country_set($config) { - if(@function_exists('mcrypt_list_algorithms')) - { - $listed = array(); - if(!isset($config['mcrypt_algo'])) - { - $config['mcrypt_algo'] = 'tripledes'; /* MCRYPT_TRIPLEDES */ - } - $algos = @mcrypt_list_algorithms(); - $found = False; - - $out = ''; - while(list($key,$value) = each($algos)) - { - $found = True; - /* Only show each once - seems this is a problem in some installs */ - if(!in_array($value,$listed)) - { - if($config['mcrypt_algo'] == $value) - { - $selected = ' selected'; - } - else - { - $selected = ''; - } - $descr = strtoupper($value); - - $out .= '' . "\n"; - $listed[] = $value; - } - } - if(!$found) - { - /* Something is wrong with their mcrypt install or php.ini */ - $out = '' . "\n";; - } - } - else - { - $out = '' . "\n";; - } - return $out; - } - - function encryptmode($config) - { - if(@function_exists('mcrypt_list_modes')) - { - $listed = array(); - if(!isset($config['mcrypt_mode'])) - { - $config['mcrypt_mode'] = 'cbc'; /* MCRYPT_MODE_CBC */ - } - $modes = @mcrypt_list_modes(); - $found = False; - - $out = ''; - while(list($key,$value) = each($modes)) - { - $found = True; - /* Only show each once - seems this is a problem in some installs */ - if(!in_array($value,$listed)) - { - if($config['mcrypt_mode'] == $value) - { - $selected = ' selected'; - } - else - { - $selected = ''; - } - $descr = strtoupper($value); - - $out .= '' . "\n"; - $listed[] = $value; - } - } - if(!$found) - { - /* Something is wrong with their mcrypt install or php.ini */ - $out = '' . "\n"; - } - } - else - { - $out = '' . "\n"; - } - return $out; - } - - function passwdhashes($config) - { - $hashes = array( - 'des' => 'des', - 'md5' => 'md5' + $country = array( + 'user_choice' => 'Users Choice', + 'force_select' => 'Force Selectbox' ); - if(@function_exists('mhash')) - { - $hashes += array('sha' => 'sha'); - } - while(list($key, $value) = each($hashes)) + $out = ''; + while (list ($key, $value) = each ($country)) { - if($config['ldap_encryption_type'] == $value) + if ($config['countrylist'] == $key) { $selected = ' selected'; } @@ -125,9 +30,9 @@ { $selected = ''; } - $descr = strtoupper($value); + $descr = lang($value); - $out .= '' . "\n"; + $out .= '' . "\n"; } return $out; } diff --git a/admin/templates/default/config.tpl b/admin/templates/default/config.tpl index 99deb7bfed..a95ab71995 100644 --- a/admin/templates/default/config.tpl +++ b/admin/templates/default/config.tpl @@ -1,198 +1,175 @@ + + +