diff --git a/setup/applications.php b/setup/applications.php index 9da4c2ddf5..0a30158b94 100644 --- a/setup/applications.php +++ b/setup/applications.php @@ -38,8 +38,6 @@ } // Does not return unless user is authorized - $ConfigDomain = get_var('ConfigDomain',Array('POST','COOKIE')); - $tpl_root = $GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup'); $setup_tpl = CreateObject('setup.Template',$tpl_root); $setup_tpl->set_file(array( @@ -117,7 +115,7 @@ if(@get_var('submit',Array('POST'))) { - $GLOBALS['phpgw_setup']->html->show_header(lang('Application Management'),False,'config',$ConfigDomain . '(' . $phpgw_domain[$ConfigDomain]['db_type'] . ')'); + $GLOBALS['phpgw_setup']->html->show_header(lang('Application Management'),False,'config',$GLOBALS['phpgw_setup']['ConfigDomain'] . '(' . $phpgw_domain[$GLOBALS['phpgw_setup']['ConfigDomain']]['db_type'] . ')'); $setup_tpl->set_var('description',lang('App install/remove/upgrade') . ':'); $setup_tpl->pparse('out','header'); @@ -238,7 +236,7 @@ } else { - $GLOBALS['phpgw_setup']->html->show_header(lang('Application Management'),False,'config',$ConfigDomain . '(' . $phpgw_domain[$ConfigDomain]['db_type'] . ')'); + $GLOBALS['phpgw_setup']->html->show_header(lang('Application Management'),False,'config',$GLOBALS['phpgw_setup']['ConfigDomain'] . '(' . $phpgw_domain[$GLOBALS['phpgw_setup']['ConfigDomain']]['db_type'] . ')'); } $detail = get_var('detail',Array('GET')); @@ -265,7 +263,7 @@ $tblcnt = count($setup_info[$detail][$key]); if(is_array($val)) { - $key = '' . $key . '(' . $tblcnt . ')' . "\n"; + $key = '' . $key . '(' . $tblcnt . ')' . "\n"; $val = implode(',' . "\n",$val); } } diff --git a/setup/config.php b/setup/config.php index d667d214fa..cd57b627f7 100644 --- a/setup/config.php +++ b/setup/config.php @@ -152,7 +152,7 @@ if($newsettings['auth_type'] != 'ldap') { - $GLOBALS['phpgw_setup']->html->show_header(lang('Configuration'),False,'config',$ConfigDomain . '(' . $phpgw_domain[$ConfigDomain]["db_type"] . ')'); + $GLOBALS['phpgw_setup']->html->show_header(lang('Configuration'),False,'config',$GLOBALS['phpgw_setup']['ConfigDomain'] . '(' . $phpgw_domain[$GLOBALS['phpgw_setup']['ConfigDomain']]['db_type'] . ')'); } @$GLOBALS['phpgw_setup']->db->query("SELECT * FROM $configtbl"); diff --git a/setup/inc/functions.inc.php b/setup/inc/functions.inc.php index e200c6698e..3d186342db 100644 --- a/setup/inc/functions.inc.php +++ b/setup/inc/functions.inc.php @@ -39,9 +39,7 @@ echo 'Please contact your System Administrator'; exit; } - - /* If we included the header.inc.php, but it is somehow broken, cover ourselves... */ if(!defined('PHPGW_SERVER_ROOT') && !defined('PHPGW_INCLUDE_ROOT')) { diff --git a/setup/lang.php b/setup/lang.php index 86763a0665..d77a9daca2 100644 --- a/setup/lang.php +++ b/setup/lang.php @@ -103,8 +103,7 @@ $setup_tpl->set_var('lang_install',lang('install')); $setup_tpl->set_var('lang_cancel',lang('cancel')); - $ConfigDomain = $_COOKIE['ConfigDomain'] ? $_COOKIE['ConfigDomain'] : $_POST['ConfigDomain']; - $GLOBALS['phpgw_setup']->html->show_header("$stage_title",False,'config',$ConfigDomain . '(' . $phpgw_domain[$ConfigDomain]['db_type'] . ')'); + $GLOBALS['phpgw_setup']->html->show_header("$stage_title",False,'config',$GLOBALS['phpgw_setup']['ConfigDomain'] . '(' . $phpgw_domain[$GLOBALS['phpgw_setup']['ConfigDomain']]['db_type'] . ')'); $setup_tpl->pparse('out','T_lang_main'); $GLOBALS['phpgw_setup']->html->show_footer(); ?> diff --git a/setup/ldap.php b/setup/ldap.php index 06df4c4d64..6d32ddaced 100644 --- a/setup/ldap.php +++ b/setup/ldap.php @@ -43,7 +43,7 @@ 'T_alert_msg' => 'msg_alert_msg.tpl' )); - $GLOBALS['phpgw_setup']->html->show_header(lang('LDAP Config'),'','config',$ConfigDomain); + $GLOBALS['phpgw_setup']->html->show_header(lang('LDAP Config'),'','config',$GLOBALS['phpgw_setup']['ConfigDomain']); if ($GLOBALS['error']) { diff --git a/setup/ldapexport.php b/setup/ldapexport.php index aa76c0d599..f5f0bcd65c 100644 --- a/setup/ldapexport.php +++ b/setup/ldapexport.php @@ -230,7 +230,7 @@ $setup_complete = True; } - $GLOBALS['phpgw_setup']->html->show_header('LDAP Export','','config',$ConfigDomain); + $GLOBALS['phpgw_setup']->html->show_header('LDAP Export','','config',$GLOBALS['phpgw_setup']['ConfigDomain']); if($error) { diff --git a/setup/ldapimport.php b/setup/ldapimport.php index 4ee67fd8c2..b9fb2d5406 100644 --- a/setup/ldapimport.php +++ b/setup/ldapimport.php @@ -395,7 +395,7 @@ $setup_complete = True; } - $GLOBALS['phpgw_setup']->html->show_header('LDAP Import','','config',$ConfigDomain); + $GLOBALS['phpgw_setup']->html->show_header('LDAP Import','','config',$GLOBALS['phpgw_setup']['ConfigDomain']); if ($error) { diff --git a/setup/ldapmodify.php b/setup/ldapmodify.php index 66819c4f81..e3ddcf3acd 100644 --- a/setup/ldapmodify.php +++ b/setup/ldapmodify.php @@ -123,7 +123,7 @@ exit; } - $GLOBALS['phpgw_setup']->html->show_header('LDAP Modify','','config',$ConfigDomain); + $GLOBALS['phpgw_setup']->html->show_header('LDAP Modify','','config',$GLOBALS['phpgw_setup']['ConfigDomain']); $setup_complete = False; if (isset($_POST['submit'])) { diff --git a/setup/schematoy.php b/setup/schematoy.php index eb3e3622a1..1442e8c805 100644 --- a/setup/schematoy.php +++ b/setup/schematoy.php @@ -105,8 +105,7 @@ exit; } - $ConfigDomain = get_var('ConfigDomain',Array('POST','COOKIE')); - $GLOBALS['phpgw_setup']->html->show_header(lang("Developers' Table Schema Toy"),False,'config',$ConfigDomain); + $GLOBALS['phpgw_setup']->html->show_header(lang("Developers' Table Schema Toy"),False,'config',$GLOBALS['phpgw_setup']['ConfigDomain']); if(get_var('submit',Array('POST'))) { diff --git a/setup/sqltoarray.php b/setup/sqltoarray.php index c3f8bd4716..3462d44248 100644 --- a/setup/sqltoarray.php +++ b/setup/sqltoarray.php @@ -31,6 +31,7 @@ $tpl_root = $GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup'); $setup_tpl = CreateObject('setup.Template',$tpl_root); + $apps = get_var('apps','GET'); $download = get_var('download',Array('GET','POST')); $submit = get_var('submit',Array('GET','POST')); $showall = get_var('showall',Array('GET','POST')); @@ -138,19 +139,24 @@ $appname = get_var('appname',array('POST','GET')); $table = get_var('table','GLOBALS'); $showall = get_var('showall',array('POST','GET')); + $apps = $GLOBALS['apps'] ? $GLOBALS['apps'] : ''; if($download) { $GLOBALS['setup_tpl']->set_var('appname',$appname); + $GLOBALS['setup_tpl']->set_var('apps',$apps); $string = $GLOBALS['setup_tpl']->parse('out',$template); } else { + $url = $GLOBALS['apps'] ? 'applications.php' : 'sqltoarray.php'; $GLOBALS['setup_tpl']->set_var('appname',$appname); $GLOBALS['setup_tpl']->set_var('table',$table); - $GLOBALS['setup_tpl']->set_var('lang_download','Download'); + $GLOBALS['setup_tpl']->set_var('lang_download',lang('Download')); + $GLOBALS['setup_tpl']->set_var('lang_cancel',lang('Cancel')); $GLOBALS['setup_tpl']->set_var('showall',$showall); - $GLOBALS['setup_tpl']->set_var('action_url','sqltoarray.php'); + $GLOBALS['setup_tpl']->set_var('apps',$apps); + $GLOBALS['setup_tpl']->set_var('action_url',$url); $GLOBALS['setup_tpl']->pfp('out',$template); } return $string; diff --git a/setup/system_charset.php b/setup/system_charset.php index 257f575e82..4d793fc03a 100644 --- a/setup/system_charset.php +++ b/setup/system_charset.php @@ -48,14 +48,14 @@ if ($diagnostics || !@$_POST['convert']) { - $GLOBALS['phpgw_setup']->html->show_header($stage_title,False,'config',$ConfigDomain . '(' . $phpgw_domain[$ConfigDomain]['db_type'] . ')'); + $GLOBALS['phpgw_setup']->html->show_header($stage_title,False,'config',$GLOBALS['phpgw_setup']['ConfigDomain'] . '(' . $phpgw_domain[$GLOBALS['phpgw_setup']['ConfigDomain']]['db_type'] . ')'); } if (@$_POST['convert']) { if (empty($_POST['current_charset'])) { $errors[] = lang('You need to select your current charset!'); - $GLOBALS['phpgw_setup']->html->show_header($stage_title,False,'config',$ConfigDomain . '(' . $phpgw_domain[$ConfigDomain]['db_type'] . ')'); + $GLOBALS['phpgw_setup']->html->show_header($stage_title,False,'config',$GLOBALS['phpgw_setup']['ConfigDomain'] . '(' . $phpgw_domain[$GLOBALS['phpgw_setup']['ConfigDomain']]['db_type'] . ')'); } else { diff --git a/setup/templates/default/sqltoarray.tpl b/setup/templates/default/sqltoarray.tpl index ede511739d..b56ef3f75c 100644 --- a/setup/templates/default/sqltoarray.tpl +++ b/setup/templates/default/sqltoarray.tpl @@ -25,9 +25,11 @@
- +   + + diff --git a/setup/templates/default/system_charset.tpl b/setup/templates/default/system_charset.tpl index ea9375c999..5fed7c6176 100644 --- a/setup/templates/default/system_charset.tpl +++ b/setup/templates/default/system_charset.tpl @@ -1,4 +1,4 @@ - +

{error_msg}