Complete adjustments to $ConfigDomain - no need to get_var if already authenticated anymore

This commit is contained in:
Miles Lott 2004-01-06 13:45:10 +00:00
parent d0904ebde2
commit 26ef5d0726
13 changed files with 24 additions and 22 deletions

View File

@ -38,8 +38,6 @@
} }
// Does not return unless user is authorized // Does not return unless user is authorized
$ConfigDomain = get_var('ConfigDomain',Array('POST','COOKIE'));
$tpl_root = $GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup'); $tpl_root = $GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup');
$setup_tpl = CreateObject('setup.Template',$tpl_root); $setup_tpl = CreateObject('setup.Template',$tpl_root);
$setup_tpl->set_file(array( $setup_tpl->set_file(array(
@ -117,7 +115,7 @@
if(@get_var('submit',Array('POST'))) 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->set_var('description',lang('App install/remove/upgrade') . ':');
$setup_tpl->pparse('out','header'); $setup_tpl->pparse('out','header');
@ -238,7 +236,7 @@
} }
else 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')); $detail = get_var('detail',Array('GET'));
@ -265,7 +263,7 @@
$tblcnt = count($setup_info[$detail][$key]); $tblcnt = count($setup_info[$detail][$key]);
if(is_array($val)) if(is_array($val))
{ {
$key = '<a href="sqltoarray.php?appname=' . $detail . '&submit=True">' . $key . '(' . $tblcnt . ')</a>' . "\n"; $key = '<a href="sqltoarray.php?appname=' . $detail . '&submit=True&apps=True">' . $key . '(' . $tblcnt . ')</a>' . "\n";
$val = implode(',' . "\n",$val); $val = implode(',' . "\n",$val);
} }
} }

View File

@ -152,7 +152,7 @@
if($newsettings['auth_type'] != 'ldap') 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"); @$GLOBALS['phpgw_setup']->db->query("SELECT * FROM $configtbl");

View File

@ -40,8 +40,6 @@
exit; exit;
} }
/* If we included the header.inc.php, but it is somehow broken, cover ourselves... */ /* If we included the header.inc.php, but it is somehow broken, cover ourselves... */
if(!defined('PHPGW_SERVER_ROOT') && !defined('PHPGW_INCLUDE_ROOT')) if(!defined('PHPGW_SERVER_ROOT') && !defined('PHPGW_INCLUDE_ROOT'))
{ {

View File

@ -103,8 +103,7 @@
$setup_tpl->set_var('lang_install',lang('install')); $setup_tpl->set_var('lang_install',lang('install'));
$setup_tpl->set_var('lang_cancel',lang('cancel')); $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',$GLOBALS['phpgw_setup']['ConfigDomain'] . '(' . $phpgw_domain[$GLOBALS['phpgw_setup']['ConfigDomain']]['db_type'] . ')');
$GLOBALS['phpgw_setup']->html->show_header("$stage_title",False,'config',$ConfigDomain . '(' . $phpgw_domain[$ConfigDomain]['db_type'] . ')');
$setup_tpl->pparse('out','T_lang_main'); $setup_tpl->pparse('out','T_lang_main');
$GLOBALS['phpgw_setup']->html->show_footer(); $GLOBALS['phpgw_setup']->html->show_footer();
?> ?>

View File

@ -43,7 +43,7 @@
'T_alert_msg' => 'msg_alert_msg.tpl' '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']) if ($GLOBALS['error'])
{ {

View File

@ -230,7 +230,7 @@
$setup_complete = True; $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) if($error)
{ {

View File

@ -395,7 +395,7 @@
$setup_complete = True; $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) if ($error)
{ {

View File

@ -123,7 +123,7 @@
exit; 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; $setup_complete = False;
if (isset($_POST['submit'])) if (isset($_POST['submit']))
{ {

View File

@ -105,8 +105,7 @@
exit; exit;
} }
$ConfigDomain = get_var('ConfigDomain',Array('POST','COOKIE')); $GLOBALS['phpgw_setup']->html->show_header(lang("Developers' Table Schema Toy"),False,'config',$GLOBALS['phpgw_setup']['ConfigDomain']);
$GLOBALS['phpgw_setup']->html->show_header(lang("Developers' Table Schema Toy"),False,'config',$ConfigDomain);
if(get_var('submit',Array('POST'))) if(get_var('submit',Array('POST')))
{ {

View File

@ -31,6 +31,7 @@
$tpl_root = $GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup'); $tpl_root = $GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup');
$setup_tpl = CreateObject('setup.Template',$tpl_root); $setup_tpl = CreateObject('setup.Template',$tpl_root);
$apps = get_var('apps','GET');
$download = get_var('download',Array('GET','POST')); $download = get_var('download',Array('GET','POST'));
$submit = get_var('submit',Array('GET','POST')); $submit = get_var('submit',Array('GET','POST'));
$showall = get_var('showall',Array('GET','POST')); $showall = get_var('showall',Array('GET','POST'));
@ -138,19 +139,24 @@
$appname = get_var('appname',array('POST','GET')); $appname = get_var('appname',array('POST','GET'));
$table = get_var('table','GLOBALS'); $table = get_var('table','GLOBALS');
$showall = get_var('showall',array('POST','GET')); $showall = get_var('showall',array('POST','GET'));
$apps = $GLOBALS['apps'] ? $GLOBALS['apps'] : '';
if($download) if($download)
{ {
$GLOBALS['setup_tpl']->set_var('appname',$appname); $GLOBALS['setup_tpl']->set_var('appname',$appname);
$GLOBALS['setup_tpl']->set_var('apps',$apps);
$string = $GLOBALS['setup_tpl']->parse('out',$template); $string = $GLOBALS['setup_tpl']->parse('out',$template);
} }
else else
{ {
$url = $GLOBALS['apps'] ? 'applications.php' : 'sqltoarray.php';
$GLOBALS['setup_tpl']->set_var('appname',$appname); $GLOBALS['setup_tpl']->set_var('appname',$appname);
$GLOBALS['setup_tpl']->set_var('table',$table); $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('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); $GLOBALS['setup_tpl']->pfp('out',$template);
} }
return $string; return $string;

View File

@ -48,14 +48,14 @@
if ($diagnostics || !@$_POST['convert']) 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 (@$_POST['convert'])
{ {
if (empty($_POST['current_charset'])) if (empty($_POST['current_charset']))
{ {
$errors[] = lang('You need to select your 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 else
{ {

View File

@ -25,9 +25,11 @@
<form method="GET" action="{action_url}"> <form method="GET" action="{action_url}">
<tr> <tr>
<td align="left" width="7%"> <td align="left" width="7%">
<input type="submit" name="download" value="{lang_download}"> <input type="submit" name="download" value="{lang_download}">&nbsp;
<input type="submit" name="cancel" value="{lang_cancel}">
<input type="hidden" name="appname" value="{appname}"> <input type="hidden" name="appname" value="{appname}">
<input type="hidden" name="table" value="{table}"> <input type="hidden" name="table" value="{table}">
<input type="hidden" name="apps" value="{apps}">
<input type="hidden" name="showall" value="{showall}"> <input type="hidden" name="showall" value="{showall}">
<input type="hidden" name="submit" value="True"> <input type="hidden" name="submit" value="True">
</td> </td>

View File

@ -1,4 +1,4 @@
<!-- begin system_chaset.tpl --> <!-- begin system_charset.tpl -->
<p align="center"><font color="red">{error_msg}</font></p> <p align="center"><font color="red">{error_msg}</font></p>
<form method="POST" action="system_charset.php"> <form method="POST" action="system_charset.php">