diff --git a/setup/index.php b/setup/index.php index a88641f8e3..4fcabcc1a0 100644 --- a/setup/index.php +++ b/setup/index.php @@ -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: diff --git a/setup/lang/phpgw_en.lang b/setup/lang/phpgw_en.lang index d879338135..8f495ad6ef 100644 --- a/setup/lang/phpgw_en.lang +++ b/setup/lang/phpgw_en.lang @@ -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 !! diff --git a/setup/templates/default/setup_db_blocks.tpl b/setup/templates/default/setup_db_blocks.tpl index 120c72b6ca..b80afdf9d1 100644 --- a/setup/templates/default/setup_db_blocks.tpl +++ b/setup/templates/default/setup_db_blocks.tpl @@ -101,9 +101,30 @@ + +