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 @@ + + +
- + + + + - - - + + + - - + + + + + + + + + - + + - - - - - - - - + + + - - + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + diff --git a/setup/config.php b/setup/config.php index 41a1bbc764..a355493173 100644 --- a/setup/config.php +++ b/setup/config.php @@ -179,10 +179,10 @@ $GLOBALS['phpgw']->common = CreateObject('phpgwapi.common'); $GLOBALS['phpgw']->db = $GLOBALS['phpgw_setup']->db; - $cfg_apps = array('phpgwapi','admin','preferences'); + /*$cfg_apps = array('phpgwapi','admin','preferences'); while(list(,$cfg_app) = each($cfg_apps)) - { - $t = CreateObject('setup.Template',$GLOBALS['phpgw']->common->get_tpl_dir($cfg_app)); + {*/ + $t = CreateObject('setup.Template',$GLOBALS['phpgw']->common->get_tpl_dir('setup')); $t->set_unknowns('keep'); $t->set_file(array('config' => 'config.tpl')); @@ -193,7 +193,7 @@ $t->set_var('row_off', 'EEEEEE'); $vars = $t->get_undefined('body'); - $GLOBALS['phpgw_setup']->hook('config',$cfg_app); + $GLOBALS['phpgw_setup']->hook('config','setup'); while(list($null,$value) = each($vars)) { @@ -256,7 +256,7 @@ $t->pfp('out','body'); unset($t); - } + //} $setup_tpl->set_var('more_configs',lang('Please login to phpgroupware and run the admin application for additional site configuration') . '.'); diff --git a/setup/inc/hook_config.inc.php b/setup/inc/hook_config.inc.php new file mode 100644 index 0000000000..1705e7945b --- /dev/null +++ b/setup/inc/hook_config.inc.php @@ -0,0 +1,134 @@ + * + * -------------------------------------------- * + * This program is free software; you can redistribute it and/or modify it * + * under the terms of the GNU General Public License as published by the * + * Free Software Foundation; either version 2 of the License, or (at your * + * option) any later version. * + \**************************************************************************/ + + /* $Id$ */ + + function encryptalgo($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' + ); + if(@function_exists('mhash')) + { + $hashes += array('sha' => 'sha'); + } + + while(list($key, $value) = each($hashes)) + { + if($config['ldap_encryption_type'] == $value) + { + $selected = ' selected'; + } + else + { + $selected = ''; + } + $descr = strtoupper($value); + + $out .= '' . "\n"; + } + return $out; + } +?> diff --git a/setup/templates/default/config.tpl b/setup/templates/default/config.tpl new file mode 100644 index 0000000000..0febb657ec --- /dev/null +++ b/setup/templates/default/config.tpl @@ -0,0 +1,353 @@ + + + + + +
 {title} {title}
 
{lang_Authentication_/_Accounts}
{lang_Enter_the_title_for_your_site}.
{lang_Select_which_type_of_authentication_you_are_using}:
{lang_Country_Selection} ({lang_Text_Entry}/{lang_SelectBox}): - +{hook_country_set} + +
{lang_Use_cookies_to_pass_sessionid}: +
{lang_Select_where_you_want_to_store/retrieve_user_accounts}:{lang_check_ip_address_of_all_sessions}: - + +
{lang_Would_you_like_phpGroupWare_to_check_for_a_new_version
when_admins_login_?}:
- {lang_Select_where_you_want_to_store/retrieve_filesystem_information}: -
- ({lang_file_type,_size,_version,_etc.}) -
- -
- {lang_Select_where_you_want_to_store/retrieve_file_contents}: -
- ({lang_Recommended:_Filesystem}) -
- + +
{lang_Minimum_account_id_(e.g._500_or_100,_etc.)}: + {lang_Timeout_for_sessions_(in_seconds)}. +
{lang_(not_for_php4_sessions)} +
{lang_Maximum_account_id_(e.g._65535_or_1000000)}:{lang_Timeout_for_application_session_data_(in_seconds)}.
{lang_Would_you_like_to_show_each_application's_upgrade_status_?}: + +
{lang_Would_you_like_phpGroupWare_to_cache_the_phpgw_info_array_?}: + +
{lang_If_using_LDAP,_do_you_want_to_manage_homedirectory_and_loginshell_attributes?}:{lang_Deny_all_users_access_to_grant_other_users_access_to_their_entries_?}: + +
{lang_Minimum_password_length}.
{lang_Require_non-alpha_characters}: + +
{lang_Require_numerical_characters}: + +
{lang_Require_special_characters}: + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 {title}
 {lang_Path_information}
{lang_Enter_the_full_path_for_temporary_files.
Examples:_/tmp,_C:\TEMP}:
{lang_Enter_the_full_path_for_users_and_group_files.
Examples:_/files,_E:\FILES}:
{lang_Enter_the_location_of_phpGroupWare's_URL.
Example:_http://www.domain.com/phpgroupware_ _or_ _/phpgroupware
No_trailing_slash}:
{lang_Image_type_selection_order}: + +
{lang_read_translations_from}: + +
 
 {lang_Host_information}
{lang_Enter_the_hostname_of_the_machine_on_which_this_server_is_running}:
{lang_Enter_your_default_FTP_server}:
{lang_Attempt_to_use_correct_mimetype_for_FTP_instead_of_default_'application/octet-stream'}: + +
{lang_Datetime_port.
If_using_port_13,_please_set_firewall_rules_appropriately_before_submitting_this_page.
(Port:_13_/_Host:_129.6.15.28)}
+ +
{lang_Enter_your_HTTP_proxy_server}:
{lang_Enter_your_HTTP_proxy_server_port}:
{lang_Enter_the_site_username_for_peer_servers}.
{lang_Enter_the_site_password_for_peer_servers}.
 
{lang_Authentication_/_Accounts}
{lang_Select_which_type_of_authentication_you_are_using}: + +
{lang_Select_where_you_want_to_store/retrieve_user_accounts}: + +
{lang_Minimum_account_id_(e.g._500_or_100,_etc.)}:
{lang_Maximum_account_id_(e.g._65535_or_1000000)}:
{lang_Auto_create_account_records_for_authenticated_users}: + +
{lang_Auto-created_user_accounts_expire}: + +
{lang_Add_auto-created_users_to_this_group_('Default'_will_be_attempted_if_this_is_empty.)}:
{lang_If_no_ACL_records_for_user_or_any_group_the_user_is_a_member_of}: + +
 
{lang_If_using_LDAP}:
{lang_Do_you_want_to_manage_homedirectory_and_loginshell_attributes?}: + +
{lang_LDAP_Default_homedirectory_prefix_(e.g._/home_for_/home/username)}:
{lang_LDAP_Default_shell_(e.g._/bin/bash)}:
{lang_LDAP_version}: + +
{lang_LDAP_host}:
{lang_LDAP_accounts_context}:
{lang_LDAP_groups_context}:
{lang_LDAP_rootdn}:
{lang_LDAP_root_password}:
{lang_LDAP_encryption_type}: + +
 
{lang_Mcrypt_settings_(requires_mcrypt_PHP_extension)}
{lang_Enter_some_random_text_for_app_session_encryption}:
{lang_Mcrypt_algorithm_(default_TRIPLEDES)}: + +
{lang_Mcrypt_mode_(default_CBC)}: + +
 
{lang_Additional_settings}
+ {lang_Select_where_you_want_to_store/retrieve_filesystem_information}: +
+ ({lang_file_type,_size,_version,_etc.}) +
+ +
+ {lang_Select_where_you_want_to_store/retrieve_file_contents}: +
+ ({lang_Recommended:_Filesystem}) +
+ +
+  +
+ + +
+
+