Add another db stage; stage 6 used to be 5; 5 now asks are you sure you want

to delete everything???
This commit is contained in:
Miles Lott 2001-12-16 16:35:39 +00:00
parent cd2709ba7c
commit 964b9aa7d6
3 changed files with 58 additions and 18 deletions

View File

@ -43,8 +43,9 @@
$setup_tpl->set_block('T_setup_db_blocks','B_db_stage_2','V_db_stage_2');
$setup_tpl->set_block('T_setup_db_blocks','B_db_stage_3','V_db_stage_3');
$setup_tpl->set_block('T_setup_db_blocks','B_db_stage_4','V_db_stage_4');
$setup_tpl->set_block('T_setup_db_blocks','B_db_stage_5_pre','V_db_stage_5_pre');
$setup_tpl->set_block('T_setup_db_blocks','B_db_stage_5_post','V_db_stage_5_post');
$setup_tpl->set_block('T_setup_db_blocks','B_db_stage_5','V_db_stage_5');
$setup_tpl->set_block('T_setup_db_blocks','B_db_stage_6_pre','V_db_stage_6_pre');
$setup_tpl->set_block('T_setup_db_blocks','B_db_stage_6_post','V_db_stage_6_post');
$setup_tpl->set_block('T_setup_db_blocks','B_db_stage_10','V_db_stage_10');
$setup_tpl->set_block('T_setup_db_blocks','B_db_stage_default','V_db_stage_default');
@ -97,33 +98,40 @@
switch($action)
{
case 'Uninstall all applications':
$subtitle = lang('Deleting Tables');
$submsg = lang('Are you sure delete your existing tables and data?') . '.';
$subaction = 'uninstall';
$GLOBALS['phpgw_info']['setup']['currentver']['phpgwapi'] = 'predrop';
$GLOBALS['phpgw_info']['setup']['stage']['db'] = 5;
break;
case 'Create Database':
$subtitle = lang('Create Database');
$submsg = lang('At your request, this script is going to attempt to create the database and assign the db user rights to it');
$subaction = 'created';
$GLOBALS['phpgw_info']['setup']['currentver']['phpgwapi'] = 'dbcreate';
$GLOBALS['phpgw_info']['setup']['stage']['db'] = 5;
$GLOBALS['phpgw_info']['setup']['stage']['db'] = 6;
break;
case 'Uninstall all applications':
case 'REALLY Uninstall all applications':
$subtitle = lang('Deleting Tables');
$submsg = lang('At your request, this script is going to take the evil action of uninstalling all your apps, which delete your existing tables and data') . '.';
$submsg = lang('At your request, this script is going to take the evil action of uninstalling all your apps, which deletes your existing tables and data') . '.';
$subaction = 'uninstalled';
$GLOBALS['phpgw_info']['setup']['currentver']['phpgwapi'] = 'drop';
$GLOBALS['phpgw_info']['setup']['stage']['db'] = 5;
$GLOBALS['phpgw_info']['setup']['stage']['db'] = 6;
break;
case 'Upgrade':
$subtitle = lang('Upgrading Tables');
$submsg = lang('At your request, this script is going to attempt to upgrade your old applications to the current versions').'.';
$subaction = 'upgraded';
$GLOBALS['phpgw_info']['setup']['currentver']['phpgwapi'] = 'oldversion';
$GLOBALS['phpgw_info']['setup']['stage']['db'] = 5;
$GLOBALS['phpgw_info']['setup']['stage']['db'] = 6;
break;
case 'Install':
$subtitle = lang('Creating Tables');
$submsg = lang('At your request, this script is going to attempt to install all the applications for you').'.';
$subaction = 'installed';
$GLOBALS['phpgw_info']['setup']['currentver']['phpgwapi'] = 'new';
$GLOBALS['phpgw_info']['setup']['stage']['db'] = 5;
$GLOBALS['phpgw_info']['setup']['stage']['db'] = 6;
break;
}
$setup_tpl->set_var('subtitle',$subtitle);
@ -209,11 +217,20 @@
$setup_tpl->set_var('V_db_filled_block',$db_filled_block);
break;
case 5:
$setup_tpl->set_var('are_you_sure',lang('ARE YOU SURE?'));
$setup_tpl->set_var('really_uninstall_all_applications',lang('REALLY Uninstall all applications'));
$setup_tpl->set_var('dropwarn',lang('Your tables will be dropped and you will lose data'));
$setup_tpl->set_var('cancel',lang('cancel'));
$setup_tpl->parse('V_db_stage_5','B_db_stage_5');
$db_filled_block = $setup_tpl->get_var('V_db_stage_5');
$setup_tpl->set_var('V_db_filled_block',$db_filled_block);
break;
case 6:
$setup_tpl->set_var('status',lang('Status'));
$setup_tpl->set_var('notcomplete',lang('not complete'));
$setup_tpl->set_var('tblchange',lang('Table Change Messages'));
$setup_tpl->parse('V_db_stage_5_pre','B_db_stage_5_pre');
$db_filled_block = $setup_tpl->get_var('V_db_stage_5_pre');
$setup_tpl->parse('V_db_stage_6_pre','B_db_stage_6_pre');
$db_filled_block = $setup_tpl->get_var('V_db_stage_6_pre');
// FIXME : CAPTURE THIS OUTPUT
$phpgw_setup->db->Halt_On_Error = 'report';
@ -243,8 +260,8 @@
$setup_tpl->set_var('tableshave',lang('If you did not receive any errors, your applications have been'));
$setup_tpl->set_var('re-check_my_installation',lang('Re-Check My Installation'));
$setup_tpl->parse('V_db_stage_5_post','B_db_stage_5_post');
$db_filled_block = $db_filled_block . $setup_tpl->get_var('V_db_stage_5_post');
$setup_tpl->parse('V_db_stage_6_post','B_db_stage_6_post');
$db_filled_block = $db_filled_block . $setup_tpl->get_var('V_db_stage_6_post');
$setup_tpl->set_var('V_db_filled_block',$db_filled_block);
break;
case 10:

View File

@ -3,6 +3,7 @@
Add auto-created users to this group ('Default' will be attempted if this is empty.) setup en Add auto-created users to this group ('Default' will be attempted if this is empty.)
Admins setup en Admins
All Users setup en All Users
are you sure? setup en ARE YOU SURE?
Attempt to use correct mimetype for FTP instead of default 'application/octet-stream' setup en Attempt to use correct mimetype for FTP instead of default 'application/octet-stream'
Authentication / Accounts setup en Authentication / Accounts
Auto create account records for authenticated users setup en Auto create account records for authenticated users
@ -151,6 +152,7 @@ process setup en Process
re-check my database setup en Re-Check my database
re-check my installation setup en Re-Check My Installation
re-enter password setup en Re-enter password
really uninstall all applications setup en REALLY Uninstall all applications
registered setup en registered
remove setup en Remove
requires reinstall or manual repair setup en Requires reinstall or manual repair
@ -207,5 +209,5 @@ your applications are current setup en Your applications are current
your database does not exist setup en Your database does not exist
your database is working, but you dont have any applications installed setup en Your database is working, but you dont have any applications installed
your tables are current setup en Your tables are current
your tables may be altered and you may lose data setup en Your tables may be altered and you may lose data
your tables will be dropped and you will lose data setup en Your tables will be dropped and you will lose data
your tables may be altered and you may lose data setup en Your tables may be altered and you may lose data.
your tables will be dropped and you will lose data setup en Your tables will be dropped and you will lose data !!

View File

@ -101,9 +101,30 @@
</tr>
<!-- END B_db_stage_4 -->
<!-- BEGIN B_db_stage_5 -->
<tr>
<td>&nbsp;</td><td align="left">{are_you_sure}</td>
</tr>
<tr>
<td align="center">
<img src="{img_incomplete}" alt="{Complete}" border="0">
</td>
<td>
<form action="index.php" method="post">
<input type="hidden" name="oldversion" value="new">
<input type="hidden" name="action" value="REALLY Uninstall all applications">
<input type="submit" name="label" value="{really_uninstall_all_applications}"> {dropwarn}
</form>
<form action="index.php" method="post">
<input type="submit" name="cancel" value="{cancel}">
</form>
</td>
</tr>
<!-- END B_db_stage_5 -->
&nbsp; <!-- ================================== --> &nbsp;
<!-- BEGIN B_db_stage_5_pre -->
<!-- BEGIN B_db_stage_6_pre -->
<tr>
<td align="center">
<img src="{img_incomplete}" alt="{notcomplete}" border="0">
@ -125,11 +146,11 @@
<font color="#fefefe">&nbsp;<b>{tblchange}</b></font>
</td>
</tr>
<!-- END B_db_stage_5_pre -->
<!-- END B_db_stage_6_pre -->
&nbsp; <!-- ================================== --> &nbsp;
<!-- BEGIN B_db_stage_5_post -->
<!-- BEGIN B_db_stage_6_post -->
<tr bgcolor="#486591">
<td>
<font color="#fefefe">&nbsp;<b>{status}</b></font>
@ -145,7 +166,7 @@
</form>
</td>
</tr>
<!-- END B_db_stage_5_post -->
<!-- END B_db_stage_6_post -->
&nbsp; <!-- ================================== --> &nbsp;