@@ -222,7 +222,7 @@ |
||
| 222 | 222 | . '<br />'.lang('to allow password authentification add the following line to your pg_hba.conf (above all others) AND restart postgres:') |
| 223 | 223 | . '<br /><i># TYPE DATABASE USER CIDR-ADDRESS METHOD</i>' |
| 224 | 224 | .($info['db_host'] ? "<br /><i><b>host $info[db_name] $info[db_user] $ip/32 password</b></i>" : |
| 225 | - "<br /><i><b>local $info[db_name] $info[db_user] password</b></i>")); |
|
| 225 | + "<br /><i><b>local $info[db_name] $info[db_user] password</b></i>")); |
|
| 226 | 226 | //$setup_tpl->parse('V_db_stage_1','B_db_stage_1'); |
| 227 | 227 | //break; |
| 228 | 228 | default: |
@@ -49,10 +49,13 @@ discard block |
||
| 49 | 49 | $GLOBALS['egw_info']['setup']['stage']['header'] = $GLOBALS['egw_setup']->detection->check_header(); |
| 50 | 50 | if ($GLOBALS['egw_info']['setup']['stage']['header'] != '10') |
| 51 | 51 | { |
| 52 | - if ($GLOBALS['egw_info']['setup']['stage']['header'] == 4) // header needs update, go there direct |
|
| 52 | + if ($GLOBALS['egw_info']['setup']['stage']['header'] == 4) |
|
| 53 | + { |
|
| 54 | + // header needs update, go there direct |
|
| 53 | 55 | { |
| 54 | 56 | Header('Location: manageheader.php'); |
| 55 | 57 | } |
| 58 | + } |
|
| 56 | 59 | else // run check-install first |
| 57 | 60 | { |
| 58 | 61 | Header('Location: check_install.php?intro=1'); |
@@ -97,7 +100,9 @@ discard block |
||
| 97 | 100 | } |
| 98 | 101 | } |
| 99 | 102 | |
| 100 | -if ($GLOBALS['DEBUG']) { echo 'Stage: ' . $GLOBALS['egw_info']['setup']['stage']['db']; } |
|
| 103 | +if ($GLOBALS['DEBUG']) |
|
| 104 | +{ |
|
| 105 | +echo 'Stage: ' . $GLOBALS['egw_info']['setup']['stage']['db']; } |
|
| 101 | 106 | // begin DEBUG code |
| 102 | 107 | //$GLOBALS['egw_info']['setup']['stage']['db'] = 0; |
| 103 | 108 | //$action = 'Upgrade'; |
@@ -501,8 +506,14 @@ discard block |
||
| 501 | 506 | $msg = ''; |
| 502 | 507 | if ($to_upgrade || $to_install) |
| 503 | 508 | { |
| 504 | - if ($to_upgrade) $msg = '<b>'.lang('The following applications need to be upgraded:').'</b> '.implode(', ',$to_upgrade); |
|
| 505 | - if ($to_install) $msg .= ($msg?'<br />':'').'<b>'.lang('The following applications are required, but NOT installed:').'</b> '.implode(', ',$to_install); |
|
| 509 | + if ($to_upgrade) |
|
| 510 | + { |
|
| 511 | + $msg = '<b>'.lang('The following applications need to be upgraded:').'</b> '.implode(', ',$to_upgrade); |
|
| 512 | + } |
|
| 513 | + if ($to_install) |
|
| 514 | + { |
|
| 515 | + $msg .= ($msg?'<br />':'').'<b>'.lang('The following applications are required, but NOT installed:').'</b> '.implode(', ',$to_install); |
|
| 516 | + } |
|
| 506 | 517 | } |
| 507 | 518 | $btn_manage_apps = $GLOBALS['egw_setup']->html->make_frm_btn_simple( |
| 508 | 519 | $msg ? $msg : lang('This stage is completed<br />'), |
@@ -184,17 +184,17 @@ discard block |
||
| 184 | 184 | |
| 185 | 185 | switch($GLOBALS['egw_info']['setup']['stage']['db']) |
| 186 | 186 | { |
| 187 | - case 1: |
|
| 188 | - $setup_tpl->set_var('dbnotexist','<b>'.lang('Your Database is not working!').'</b>: '.$GLOBALS['egw_setup']->db->Error); |
|
| 189 | - $setup_tpl->set_var('makesure',lang('Make sure that your database is created and the account permissions are set')); |
|
| 190 | - $setup_tpl->set_var('notcomplete',lang('not complete')); |
|
| 191 | - $setup_tpl->set_var('oncesetup',lang('Once the database is setup correctly')); |
|
| 192 | - $setup_tpl->set_var('createdb','<b>'.lang('Or we can attempt to create the database for you:').'</b>'); |
|
| 193 | - $setup_tpl->set_var('create_database',lang('Create database')); |
|
| 194 | - $setup_tpl->set_var('instr',''); |
|
| 195 | - $info = $GLOBALS['egw_domain'][$GLOBALS['egw_setup']->ConfigDomain]; |
|
| 196 | - switch ($info['db_type']) |
|
| 197 | - { |
|
| 187 | + case 1: |
|
| 188 | + $setup_tpl->set_var('dbnotexist','<b>'.lang('Your Database is not working!').'</b>: '.$GLOBALS['egw_setup']->db->Error); |
|
| 189 | + $setup_tpl->set_var('makesure',lang('Make sure that your database is created and the account permissions are set')); |
|
| 190 | + $setup_tpl->set_var('notcomplete',lang('not complete')); |
|
| 191 | + $setup_tpl->set_var('oncesetup',lang('Once the database is setup correctly')); |
|
| 192 | + $setup_tpl->set_var('createdb','<b>'.lang('Or we can attempt to create the database for you:').'</b>'); |
|
| 193 | + $setup_tpl->set_var('create_database',lang('Create database')); |
|
| 194 | + $setup_tpl->set_var('instr',''); |
|
| 195 | + $info = $GLOBALS['egw_domain'][$GLOBALS['egw_setup']->ConfigDomain]; |
|
| 196 | + switch ($info['db_type']) |
|
| 197 | + { |
|
| 198 | 198 | case 'mysql': |
| 199 | 199 | case 'mysqli': |
| 200 | 200 | case 'mysqlt': |
@@ -227,77 +227,77 @@ discard block |
||
| 227 | 227 | //break; |
| 228 | 228 | default: |
| 229 | 229 | $setup_tpl->parse('V_db_stage_1','B_db_stage_1a'); |
| 230 | - } |
|
| 230 | + } |
|
| 231 | 231 | $db_filled_block = $setup_tpl->get_var('V_db_stage_1'); |
| 232 | 232 | $setup_tpl->set_var('V_db_filled_block',$db_filled_block); |
| 233 | 233 | break; |
| 234 | - case 2: |
|
| 235 | - $setup_tpl->set_var('prebeta',lang('You appear to be running a pre-beta version of EGroupware.<br />These versions are no longer supported, and there is no upgrade path for them in setup.<br /> You may wish to first upgrade to 0.9.10 (the last version to support pre-beta upgrades) <br />and then upgrade from there with the current version.')); |
|
| 236 | - $setup_tpl->set_var('notcomplete',lang('not complete')); |
|
| 237 | - $setup_tpl->parse('V_db_stage_2','B_db_stage_2'); |
|
| 238 | - $db_filled_block = $setup_tpl->get_var('V_db_stage_2'); |
|
| 239 | - $setup_tpl->set_var('V_db_filled_block',$db_filled_block); |
|
| 240 | - break; |
|
| 241 | - case 3: |
|
| 242 | - $setup_tpl->set_var('dbexists','<b>'.lang('Your database is working, but you dont have any applications installed').'</b>'); |
|
| 243 | - $setup_tpl->set_var('install',lang('Install')); |
|
| 244 | - $setup_tpl->set_var('proceed',lang('We can proceed')); |
|
| 245 | - $setup_tpl->set_var('coreapps',lang('all applications')); |
|
| 246 | - $setup_tpl->set_var('lang_debug',lang('enable for extra debug-messages')); |
|
| 247 | - $setup_tpl->set_var('lang_restore',lang('Or you can install a previous backup.')); |
|
| 248 | - $setup_tpl->set_var('upload','<input type="file" name="uploaded" /> '. |
|
| 249 | - '<input type="submit" name="upload" value="'.htmlspecialchars(lang('install backup')).'" title="'.htmlspecialchars(lang("uploads a backup and installs it on your DB")).'" />'); |
|
| 250 | - $setup_tpl->set_var('convert_checkbox','<input type="checkbox" name="convert_charset" id="convert_checkbox" value="1"/>'); |
|
| 251 | - $setup_tpl->set_var('lang_convert_charset','<label for="convert_checkbox">'. |
|
| 252 | - lang('Convert backup to charset selected above').'</label>'); |
|
| 253 | - $setup_tpl->parse('V_db_stage_3','B_db_stage_3'); |
|
| 254 | - $db_filled_block = $setup_tpl->get_var('V_db_stage_3'); |
|
| 255 | - $setup_tpl->set_var('V_db_filled_block',$db_filled_block); |
|
| 256 | - break; |
|
| 257 | - case 4: |
|
| 258 | - $setup_tpl->set_var('hidden_vars', Api\Html::input_hidden('csrf_token', Api\Csrf::token(__FILE__))); |
|
| 259 | - $setup_tpl->set_var('oldver',lang('You appear to be running version %1 of EGroupware', |
|
| 260 | - isset($setup_info['api']['currentver']) ? $setup_info['api']['currentver'] : $setup_info['phpgwapi']['currentver'])); |
|
| 261 | - $setup_tpl->set_var('automatic',lang('We will automatically update your tables/records to %1',$setup_info['api']['version'])); |
|
| 262 | - $setup_tpl->set_var('backupwarn',lang('but we <u>highly recommend backing up</u> your tables in case the script causes damage to your data.<br /><strong>These automated scripts can easily destroy your data.</strong>')); |
|
| 263 | - $setup_tpl->set_var('lang_backup',lang('create a backup before upgrading the DB')); |
|
| 264 | - $setup_tpl->set_var('lang_debug',lang('enable for extra debug-messages')); |
|
| 265 | - $setup_tpl->set_var('upgrade',lang('Upgrade')); |
|
| 266 | - $setup_tpl->set_var('goto',lang('Go to')); |
|
| 267 | - $setup_tpl->set_var('configuration',lang('configuration')); |
|
| 268 | - $setup_tpl->set_var('admin_account',lang('Create admin account')); |
|
| 269 | - $setup_tpl->set_var('applications',lang('Manage Applications')); |
|
| 270 | - $setup_tpl->set_var('db_backup',lang('DB backup and restore')); |
|
| 271 | - $setup_tpl->set_var('language_management',lang('Manage Languages')); |
|
| 272 | - $setup_tpl->set_var('uninstall_all_applications',lang('Uninstall all applications')); |
|
| 273 | - $setup_tpl->set_var('dont_touch_my_data',lang('Dont touch my data')); |
|
| 274 | - $setup_tpl->set_var('dropwarn',lang('Your tables will be dropped and you will lose data')); |
|
| 234 | + case 2: |
|
| 235 | + $setup_tpl->set_var('prebeta',lang('You appear to be running a pre-beta version of EGroupware.<br />These versions are no longer supported, and there is no upgrade path for them in setup.<br /> You may wish to first upgrade to 0.9.10 (the last version to support pre-beta upgrades) <br />and then upgrade from there with the current version.')); |
|
| 236 | + $setup_tpl->set_var('notcomplete',lang('not complete')); |
|
| 237 | + $setup_tpl->parse('V_db_stage_2','B_db_stage_2'); |
|
| 238 | + $db_filled_block = $setup_tpl->get_var('V_db_stage_2'); |
|
| 239 | + $setup_tpl->set_var('V_db_filled_block',$db_filled_block); |
|
| 240 | + break; |
|
| 241 | + case 3: |
|
| 242 | + $setup_tpl->set_var('dbexists','<b>'.lang('Your database is working, but you dont have any applications installed').'</b>'); |
|
| 243 | + $setup_tpl->set_var('install',lang('Install')); |
|
| 244 | + $setup_tpl->set_var('proceed',lang('We can proceed')); |
|
| 245 | + $setup_tpl->set_var('coreapps',lang('all applications')); |
|
| 246 | + $setup_tpl->set_var('lang_debug',lang('enable for extra debug-messages')); |
|
| 247 | + $setup_tpl->set_var('lang_restore',lang('Or you can install a previous backup.')); |
|
| 248 | + $setup_tpl->set_var('upload','<input type="file" name="uploaded" /> '. |
|
| 249 | + '<input type="submit" name="upload" value="'.htmlspecialchars(lang('install backup')).'" title="'.htmlspecialchars(lang("uploads a backup and installs it on your DB")).'" />'); |
|
| 250 | + $setup_tpl->set_var('convert_checkbox','<input type="checkbox" name="convert_charset" id="convert_checkbox" value="1"/>'); |
|
| 251 | + $setup_tpl->set_var('lang_convert_charset','<label for="convert_checkbox">'. |
|
| 252 | + lang('Convert backup to charset selected above').'</label>'); |
|
| 253 | + $setup_tpl->parse('V_db_stage_3','B_db_stage_3'); |
|
| 254 | + $db_filled_block = $setup_tpl->get_var('V_db_stage_3'); |
|
| 255 | + $setup_tpl->set_var('V_db_filled_block',$db_filled_block); |
|
| 256 | + break; |
|
| 257 | + case 4: |
|
| 258 | + $setup_tpl->set_var('hidden_vars', Api\Html::input_hidden('csrf_token', Api\Csrf::token(__FILE__))); |
|
| 259 | + $setup_tpl->set_var('oldver',lang('You appear to be running version %1 of EGroupware', |
|
| 260 | + isset($setup_info['api']['currentver']) ? $setup_info['api']['currentver'] : $setup_info['phpgwapi']['currentver'])); |
|
| 261 | + $setup_tpl->set_var('automatic',lang('We will automatically update your tables/records to %1',$setup_info['api']['version'])); |
|
| 262 | + $setup_tpl->set_var('backupwarn',lang('but we <u>highly recommend backing up</u> your tables in case the script causes damage to your data.<br /><strong>These automated scripts can easily destroy your data.</strong>')); |
|
| 263 | + $setup_tpl->set_var('lang_backup',lang('create a backup before upgrading the DB')); |
|
| 264 | + $setup_tpl->set_var('lang_debug',lang('enable for extra debug-messages')); |
|
| 265 | + $setup_tpl->set_var('upgrade',lang('Upgrade')); |
|
| 266 | + $setup_tpl->set_var('goto',lang('Go to')); |
|
| 267 | + $setup_tpl->set_var('configuration',lang('configuration')); |
|
| 268 | + $setup_tpl->set_var('admin_account',lang('Create admin account')); |
|
| 269 | + $setup_tpl->set_var('applications',lang('Manage Applications')); |
|
| 270 | + $setup_tpl->set_var('db_backup',lang('DB backup and restore')); |
|
| 271 | + $setup_tpl->set_var('language_management',lang('Manage Languages')); |
|
| 272 | + $setup_tpl->set_var('uninstall_all_applications',lang('Uninstall all applications')); |
|
| 273 | + $setup_tpl->set_var('dont_touch_my_data',lang('Dont touch my data')); |
|
| 274 | + $setup_tpl->set_var('dropwarn',lang('Your tables will be dropped and you will lose data')); |
|
| 275 | 275 | |
| 276 | - $setup_tpl->parse('V_db_stage_4','B_db_stage_4'); |
|
| 277 | - $db_filled_block = $setup_tpl->get_var('V_db_stage_4'); |
|
| 278 | - $setup_tpl->set_var('V_db_filled_block',$db_filled_block); |
|
| 279 | - break; |
|
| 280 | - case 5: |
|
| 281 | - $setup_tpl->set_var('hidden_vars', Api\Html::input_hidden('csrf_token', Api\Csrf::token(__FILE__))); |
|
| 282 | - $setup_tpl->set_var('are_you_sure',lang('ARE YOU SURE?')); |
|
| 283 | - $setup_tpl->set_var('really_uninstall_all_applications',lang('REALLY Uninstall all applications')); |
|
| 284 | - $setup_tpl->set_var('dropwarn',lang('Your tables will be dropped and you will lose data')); |
|
| 285 | - $setup_tpl->set_var('cancel',lang('cancel')); |
|
| 286 | - $setup_tpl->parse('V_db_stage_5','B_db_stage_5'); |
|
| 287 | - $db_filled_block = $setup_tpl->get_var('V_db_stage_5'); |
|
| 288 | - $setup_tpl->set_var('V_db_filled_block',$db_filled_block); |
|
| 289 | - break; |
|
| 290 | - case 6: |
|
| 291 | - $setup_tpl->set_var('status',lang('Status')); |
|
| 292 | - $setup_tpl->set_var('notcomplete',lang('not complete')); |
|
| 293 | - $setup_tpl->set_var('tblchange',lang('Table Change Messages')); |
|
| 294 | - $setup_tpl->parse('V_db_stage_6_pre','B_db_stage_6_pre'); |
|
| 295 | - $db_filled_block = $setup_tpl->get_var('V_db_stage_6_pre'); |
|
| 296 | - $setup_tpl->set_var('tableshave',lang('If you did not receive any errors, your applications have been')); |
|
| 276 | + $setup_tpl->parse('V_db_stage_4','B_db_stage_4'); |
|
| 277 | + $db_filled_block = $setup_tpl->get_var('V_db_stage_4'); |
|
| 278 | + $setup_tpl->set_var('V_db_filled_block',$db_filled_block); |
|
| 279 | + break; |
|
| 280 | + case 5: |
|
| 281 | + $setup_tpl->set_var('hidden_vars', Api\Html::input_hidden('csrf_token', Api\Csrf::token(__FILE__))); |
|
| 282 | + $setup_tpl->set_var('are_you_sure',lang('ARE YOU SURE?')); |
|
| 283 | + $setup_tpl->set_var('really_uninstall_all_applications',lang('REALLY Uninstall all applications')); |
|
| 284 | + $setup_tpl->set_var('dropwarn',lang('Your tables will be dropped and you will lose data')); |
|
| 285 | + $setup_tpl->set_var('cancel',lang('cancel')); |
|
| 286 | + $setup_tpl->parse('V_db_stage_5','B_db_stage_5'); |
|
| 287 | + $db_filled_block = $setup_tpl->get_var('V_db_stage_5'); |
|
| 288 | + $setup_tpl->set_var('V_db_filled_block',$db_filled_block); |
|
| 289 | + break; |
|
| 290 | + case 6: |
|
| 291 | + $setup_tpl->set_var('status',lang('Status')); |
|
| 292 | + $setup_tpl->set_var('notcomplete',lang('not complete')); |
|
| 293 | + $setup_tpl->set_var('tblchange',lang('Table Change Messages')); |
|
| 294 | + $setup_tpl->parse('V_db_stage_6_pre','B_db_stage_6_pre'); |
|
| 295 | + $db_filled_block = $setup_tpl->get_var('V_db_stage_6_pre'); |
|
| 296 | + $setup_tpl->set_var('tableshave',lang('If you did not receive any errors, your applications have been')); |
|
| 297 | 297 | |
| 298 | - try { // catch DB errors to report them |
|
| 299 | - switch ($GLOBALS['egw_info']['setup']['currentver']['phpgwapi']) |
|
| 300 | - { |
|
| 298 | + try { // catch DB errors to report them |
|
| 299 | + switch ($GLOBALS['egw_info']['setup']['currentver']['phpgwapi']) |
|
| 300 | + { |
|
| 301 | 301 | case 'dbcreate': |
| 302 | 302 | $GLOBALS['egw_setup']->db->create_database($_POST['db_root'], $_POST['db_pass'], 'utf8', // create all new db's with utf8 |
| 303 | 303 | !preg_match('/^[0-9.a-z_]+$/i', $_POST['db_grant_host']) ? 'localhost' : $_POST['db_grant_host']); |
@@ -376,7 +376,7 @@ discard block |
||
| 376 | 376 | $GLOBALS['egw_info']['setup']['currentver']['phpgwapi'] = 'oldversion'; |
| 377 | 377 | } |
| 378 | 378 | break; |
| 379 | - } |
|
| 379 | + } |
|
| 380 | 380 | } |
| 381 | 381 | catch (Api\Db\Exception $e) |
| 382 | 382 | { |
@@ -388,21 +388,21 @@ discard block |
||
| 388 | 388 | $db_filled_block = $db_filled_block . $setup_tpl->get_var('V_db_stage_6_post'); |
| 389 | 389 | $setup_tpl->set_var('V_db_filled_block',$db_filled_block); |
| 390 | 390 | break; |
| 391 | - case 10: |
|
| 392 | - $setup_tpl->set_var('tablescurrent',lang('Your EGroupware API is current')); |
|
| 393 | - $setup_tpl->set_var('uninstall_all_applications',lang('Uninstall all applications')); |
|
| 394 | - $setup_tpl->set_var('dropwarn',lang('Your tables will be dropped and you will lose data')); |
|
| 395 | - $setup_tpl->set_var('deletetables',lang('Uninstall all applications')); |
|
| 396 | - $setup_tpl->parse('V_db_stage_10','B_db_stage_10'); |
|
| 397 | - $db_filled_block = $setup_tpl->get_var('V_db_stage_10'); |
|
| 398 | - $setup_tpl->set_var('V_db_filled_block',$db_filled_block); |
|
| 399 | - break; |
|
| 400 | - default: |
|
| 401 | - $setup_tpl->set_var('dbnotexist',lang('Your database does not exist')); |
|
| 402 | - $setup_tpl->parse('V_db_stage_default','B_db_stage_default'); |
|
| 403 | - $db_filled_block = $setup_tpl->get_var('V_db_stage_default'); |
|
| 404 | - $setup_tpl->set_var('V_db_filled_block',$db_filled_block); |
|
| 405 | - break; |
|
| 391 | + case 10: |
|
| 392 | + $setup_tpl->set_var('tablescurrent',lang('Your EGroupware API is current')); |
|
| 393 | + $setup_tpl->set_var('uninstall_all_applications',lang('Uninstall all applications')); |
|
| 394 | + $setup_tpl->set_var('dropwarn',lang('Your tables will be dropped and you will lose data')); |
|
| 395 | + $setup_tpl->set_var('deletetables',lang('Uninstall all applications')); |
|
| 396 | + $setup_tpl->parse('V_db_stage_10','B_db_stage_10'); |
|
| 397 | + $db_filled_block = $setup_tpl->get_var('V_db_stage_10'); |
|
| 398 | + $setup_tpl->set_var('V_db_filled_block',$db_filled_block); |
|
| 399 | + break; |
|
| 400 | + default: |
|
| 401 | + $setup_tpl->set_var('dbnotexist',lang('Your database does not exist')); |
|
| 402 | + $setup_tpl->parse('V_db_stage_default','B_db_stage_default'); |
|
| 403 | + $db_filled_block = $setup_tpl->get_var('V_db_stage_default'); |
|
| 404 | + $setup_tpl->set_var('V_db_filled_block',$db_filled_block); |
|
| 405 | + break; |
|
| 406 | 406 | } |
| 407 | 407 | |
| 408 | 408 | // Config Section |
@@ -20,8 +20,7 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | $tpl_root = $GLOBALS['egw_setup']->html->setup_tpl_dir('setup'); |
| 22 | 22 | $setup_tpl = new Framework\Template($tpl_root); |
| 23 | -$setup_tpl->set_file(array |
|
| 24 | -( |
|
| 23 | +$setup_tpl->set_file(array( |
|
| 25 | 24 | 'T_head' => 'head.tpl', |
| 26 | 25 | 'T_footer' => 'footer.tpl', |
| 27 | 26 | 'T_alert_msg' => 'msg_alert_msg.tpl', |
@@ -31,19 +30,19 @@ discard block |
||
| 31 | 30 | 'T_setup_db_blocks' => 'setup_db_blocks.tpl' |
| 32 | 31 | )); |
| 33 | 32 | |
| 34 | -$setup_tpl->set_block('T_login_stage_header','B_multi_domain','V_multi_domain'); |
|
| 35 | -$setup_tpl->set_block('T_login_stage_header','B_single_domain','V_single_domain'); |
|
| 33 | +$setup_tpl->set_block('T_login_stage_header', 'B_multi_domain', 'V_multi_domain'); |
|
| 34 | +$setup_tpl->set_block('T_login_stage_header', 'B_single_domain', 'V_single_domain'); |
|
| 36 | 35 | |
| 37 | -$setup_tpl->set_block('T_setup_db_blocks','B_db_stage_1','V_db_stage_1'); |
|
| 38 | -$setup_tpl->set_block('T_setup_db_blocks','B_db_stage_1a','V_db_stage_1a'); |
|
| 39 | -$setup_tpl->set_block('T_setup_db_blocks','B_db_stage_2','V_db_stage_2'); |
|
| 40 | -$setup_tpl->set_block('T_setup_db_blocks','B_db_stage_3','V_db_stage_3'); |
|
| 41 | -$setup_tpl->set_block('T_setup_db_blocks','B_db_stage_4','V_db_stage_4'); |
|
| 42 | -$setup_tpl->set_block('T_setup_db_blocks','B_db_stage_5','V_db_stage_5'); |
|
| 43 | -$setup_tpl->set_block('T_setup_db_blocks','B_db_stage_6_pre','V_db_stage_6_pre'); |
|
| 44 | -$setup_tpl->set_block('T_setup_db_blocks','B_db_stage_6_post','V_db_stage_6_post'); |
|
| 45 | -$setup_tpl->set_block('T_setup_db_blocks','B_db_stage_10','V_db_stage_10'); |
|
| 46 | -$setup_tpl->set_block('T_setup_db_blocks','B_db_stage_default','V_db_stage_default'); |
|
| 36 | +$setup_tpl->set_block('T_setup_db_blocks', 'B_db_stage_1', 'V_db_stage_1'); |
|
| 37 | +$setup_tpl->set_block('T_setup_db_blocks', 'B_db_stage_1a', 'V_db_stage_1a'); |
|
| 38 | +$setup_tpl->set_block('T_setup_db_blocks', 'B_db_stage_2', 'V_db_stage_2'); |
|
| 39 | +$setup_tpl->set_block('T_setup_db_blocks', 'B_db_stage_3', 'V_db_stage_3'); |
|
| 40 | +$setup_tpl->set_block('T_setup_db_blocks', 'B_db_stage_4', 'V_db_stage_4'); |
|
| 41 | +$setup_tpl->set_block('T_setup_db_blocks', 'B_db_stage_5', 'V_db_stage_5'); |
|
| 42 | +$setup_tpl->set_block('T_setup_db_blocks', 'B_db_stage_6_pre', 'V_db_stage_6_pre'); |
|
| 43 | +$setup_tpl->set_block('T_setup_db_blocks', 'B_db_stage_6_post', 'V_db_stage_6_post'); |
|
| 44 | +$setup_tpl->set_block('T_setup_db_blocks', 'B_db_stage_10', 'V_db_stage_10'); |
|
| 45 | +$setup_tpl->set_block('T_setup_db_blocks', 'B_db_stage_default', 'V_db_stage_default'); |
|
| 47 | 46 | |
| 48 | 47 | // Check header and authentication |
| 49 | 48 | $GLOBALS['egw_info']['setup']['stage']['header'] = $GLOBALS['egw_setup']->detection->check_header(); |
@@ -59,9 +58,9 @@ discard block |
||
| 59 | 58 | } |
| 60 | 59 | exit; |
| 61 | 60 | } |
| 62 | -elseif(!$GLOBALS['egw_setup']->auth('Config')) |
|
| 61 | +elseif (!$GLOBALS['egw_setup']->auth('Config')) |
|
| 63 | 62 | { |
| 64 | - $GLOBALS['egw_setup']->html->show_header(lang('Please login'),True); |
|
| 63 | + $GLOBALS['egw_setup']->html->show_header(lang('Please login'), True); |
|
| 65 | 64 | $GLOBALS['egw_setup']->html->login_form(); |
| 66 | 65 | $GLOBALS['egw_setup']->html->show_footer(); |
| 67 | 66 | exit; |
@@ -73,11 +72,11 @@ discard block |
||
| 73 | 72 | $GLOBALS['egw_info']['setup']['header_msg'], |
| 74 | 73 | False, |
| 75 | 74 | 'config', |
| 76 | - $GLOBALS['egw_setup']->ConfigDomain . ' (' . $GLOBALS['egw_domain'][$GLOBALS['egw_setup']->ConfigDomain]['db_type'].'://'. |
|
| 75 | + $GLOBALS['egw_setup']->ConfigDomain.' ('.$GLOBALS['egw_domain'][$GLOBALS['egw_setup']->ConfigDomain]['db_type'].'://'. |
|
| 77 | 76 | $GLOBALS['egw_domain'][$GLOBALS['egw_setup']->ConfigDomain]['db_user'].'@'. |
| 78 | 77 | $GLOBALS['egw_domain'][$GLOBALS['egw_setup']->ConfigDomain]['db_host'].':'. |
| 79 | 78 | $GLOBALS['egw_domain'][$GLOBALS['egw_setup']->ConfigDomain]['db_port'].'/'. |
| 80 | - $GLOBALS['egw_domain'][$GLOBALS['egw_setup']->ConfigDomain]['db_name'] . ')' |
|
| 79 | + $GLOBALS['egw_domain'][$GLOBALS['egw_setup']->ConfigDomain]['db_name'].')' |
|
| 81 | 80 | ); |
| 82 | 81 | /* Add cleaning of app_sessions per skeeter, but with a check for the table being there, just in case */ |
| 83 | 82 | /* $GLOBALS['egw_setup']->clear_session_cache(); */ |
@@ -91,23 +90,23 @@ discard block |
||
| 91 | 90 | $GLOBALS['egw_setup']->detection->get_versions()); |
| 92 | 91 | |
| 93 | 92 | $GLOBALS['egw_info']['setup']['stage']['db'] = $GLOBALS['egw_setup']->detection->check_db($setup_info); |
| 94 | - if($GLOBALS['DEBUG']) |
|
| 93 | + if ($GLOBALS['DEBUG']) |
|
| 95 | 94 | { |
| 96 | 95 | _debug_array($setup_info); |
| 97 | 96 | } |
| 98 | 97 | } |
| 99 | 98 | |
| 100 | -if ($GLOBALS['DEBUG']) { echo 'Stage: ' . $GLOBALS['egw_info']['setup']['stage']['db']; } |
|
| 99 | +if ($GLOBALS['DEBUG']) { echo 'Stage: '.$GLOBALS['egw_info']['setup']['stage']['db']; } |
|
| 101 | 100 | // begin DEBUG code |
| 102 | 101 | //$GLOBALS['egw_info']['setup']['stage']['db'] = 0; |
| 103 | 102 | //$action = 'Upgrade'; |
| 104 | 103 | // end DEBUG code |
| 105 | 104 | |
| 106 | -switch($_POST['action']) |
|
| 105 | +switch ($_POST['action']) |
|
| 107 | 106 | { |
| 108 | 107 | case 'Uninstall all applications': |
| 109 | 108 | $subtitle = lang('Deleting Tables'); |
| 110 | - $submsg = lang('Are you sure you want to delete your existing tables and data?') . '.'; |
|
| 109 | + $submsg = lang('Are you sure you want to delete your existing tables and data?').'.'; |
|
| 111 | 110 | $subaction = lang('uninstall'); |
| 112 | 111 | $GLOBALS['egw_info']['setup']['currentver']['phpgwapi'] = 'predrop'; |
| 113 | 112 | $GLOBALS['egw_info']['setup']['stage']['db'] = 5; |
@@ -121,7 +120,7 @@ discard block |
||
| 121 | 120 | break; |
| 122 | 121 | case 'REALLY Uninstall all applications': |
| 123 | 122 | $subtitle = lang('Deleting Tables'); |
| 124 | - $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') . '.'; |
|
| 123 | + $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').'.'; |
|
| 125 | 124 | $subaction = lang('uninstalled'); |
| 126 | 125 | $GLOBALS['egw_info']['setup']['currentver']['phpgwapi'] = 'drop'; |
| 127 | 126 | $GLOBALS['egw_info']['setup']['stage']['db'] = 6; |
@@ -152,17 +151,17 @@ discard block |
||
| 152 | 151 | $GLOBALS['egw_info']['setup']['stage']['db'] = 6; |
| 153 | 152 | break; |
| 154 | 153 | } |
| 155 | -$setup_tpl->set_var('subtitle',@$subtitle); |
|
| 156 | -$setup_tpl->set_var('submsg',@$submsg); |
|
| 157 | -$setup_tpl->set_var('subaction',@$subaction); |
|
| 154 | +$setup_tpl->set_var('subtitle', @$subtitle); |
|
| 155 | +$setup_tpl->set_var('submsg', @$submsg); |
|
| 156 | +$setup_tpl->set_var('subaction', @$subaction); |
|
| 158 | 157 | |
| 159 | 158 | // Old PHP |
| 160 | -if ((float) PHP_VERSION < $GLOBALS['egw_setup']->required_php_version) |
|
| 159 | +if ((float)PHP_VERSION < $GLOBALS['egw_setup']->required_php_version) |
|
| 161 | 160 | { |
| 162 | - $GLOBALS['egw_setup']->html->show_header($GLOBALS['egw_info']['setup']['header_msg'],True); |
|
| 161 | + $GLOBALS['egw_setup']->html->show_header($GLOBALS['egw_info']['setup']['header_msg'], True); |
|
| 163 | 162 | $GLOBALS['egw_setup']->html->show_alert_msg('Error', |
| 164 | 163 | lang('You are using PHP version %1. EGroupware now requires %2 or later, recommended is PHP %3.', |
| 165 | - PHP_VERSION,$GLOBALS['egw_setup']->required_php_version,$GLOBALS['egw_setup']->recommended_php_version)); |
|
| 164 | + PHP_VERSION, $GLOBALS['egw_setup']->required_php_version, $GLOBALS['egw_setup']->recommended_php_version)); |
|
| 166 | 165 | $GLOBALS['egw_setup']->html->show_footer(); |
| 167 | 166 | exit; |
| 168 | 167 | } |
@@ -171,135 +170,134 @@ discard block |
||
| 171 | 170 | |
| 172 | 171 | //$GLOBALS['egw_setup']->app_status(); |
| 173 | 172 | $GLOBALS['egw_info']['server']['app_images'] = 'templates/default/images'; |
| 174 | -$incomplete = $GLOBALS['egw_info']['server']['app_images'] . '/incomplete.png'; |
|
| 175 | -$completed = $GLOBALS['egw_info']['server']['app_images'] . '/completed.png'; |
|
| 173 | +$incomplete = $GLOBALS['egw_info']['server']['app_images'].'/incomplete.png'; |
|
| 174 | +$completed = $GLOBALS['egw_info']['server']['app_images'].'/completed.png'; |
|
| 176 | 175 | |
| 177 | -$setup_tpl->set_var('img_incomplete',$incomplete); |
|
| 178 | -$setup_tpl->set_var('img_completed',$completed); |
|
| 176 | +$setup_tpl->set_var('img_incomplete', $incomplete); |
|
| 177 | +$setup_tpl->set_var('img_completed', $completed); |
|
| 179 | 178 | |
| 180 | -$setup_tpl->set_var('db_step_text',lang('Step %1 - Simple Application Management', ++$num)); |
|
| 181 | -$setup_tpl->set_var('lang_system_charset',lang('<b>charset to use</b> (use utf-8 if you plan to use languages with different charsets):')); |
|
| 182 | -$setup_tpl->set_var('system_charset',str_replace('&','&', |
|
| 183 | - $GLOBALS['egw_setup']->translation->get_charsets('system_charset',$GLOBALS['egw_setup']->system_charset))); |
|
| 179 | +$setup_tpl->set_var('db_step_text', lang('Step %1 - Simple Application Management', ++$num)); |
|
| 180 | +$setup_tpl->set_var('lang_system_charset', lang('<b>charset to use</b> (use utf-8 if you plan to use languages with different charsets):')); |
|
| 181 | +$setup_tpl->set_var('system_charset', str_replace('&', '&', |
|
| 182 | + $GLOBALS['egw_setup']->translation->get_charsets('system_charset', $GLOBALS['egw_setup']->system_charset))); |
|
| 184 | 183 | |
| 185 | -switch($GLOBALS['egw_info']['setup']['stage']['db']) |
|
| 184 | +switch ($GLOBALS['egw_info']['setup']['stage']['db']) |
|
| 186 | 185 | { |
| 187 | 186 | case 1: |
| 188 | - $setup_tpl->set_var('dbnotexist','<b>'.lang('Your Database is not working!').'</b>: '.$GLOBALS['egw_setup']->db->Error); |
|
| 189 | - $setup_tpl->set_var('makesure',lang('Make sure that your database is created and the account permissions are set')); |
|
| 190 | - $setup_tpl->set_var('notcomplete',lang('not complete')); |
|
| 191 | - $setup_tpl->set_var('oncesetup',lang('Once the database is setup correctly')); |
|
| 192 | - $setup_tpl->set_var('createdb','<b>'.lang('Or we can attempt to create the database for you:').'</b>'); |
|
| 193 | - $setup_tpl->set_var('create_database',lang('Create database')); |
|
| 194 | - $setup_tpl->set_var('instr',''); |
|
| 187 | + $setup_tpl->set_var('dbnotexist', '<b>'.lang('Your Database is not working!').'</b>: '.$GLOBALS['egw_setup']->db->Error); |
|
| 188 | + $setup_tpl->set_var('makesure', lang('Make sure that your database is created and the account permissions are set')); |
|
| 189 | + $setup_tpl->set_var('notcomplete', lang('not complete')); |
|
| 190 | + $setup_tpl->set_var('oncesetup', lang('Once the database is setup correctly')); |
|
| 191 | + $setup_tpl->set_var('createdb', '<b>'.lang('Or we can attempt to create the database for you:').'</b>'); |
|
| 192 | + $setup_tpl->set_var('create_database', lang('Create database')); |
|
| 193 | + $setup_tpl->set_var('instr', ''); |
|
| 195 | 194 | $info = $GLOBALS['egw_domain'][$GLOBALS['egw_setup']->ConfigDomain]; |
| 196 | 195 | switch ($info['db_type']) |
| 197 | 196 | { |
| 198 | 197 | case 'mysql': |
| 199 | 198 | case 'mysqli': |
| 200 | 199 | case 'mysqlt': |
| 201 | - $set_charset = (float) $GLOBALS['egw_setup']->db->ServerInfo['version'] >= 4.1 ? ' DEFAULT CHARACTER SET utf8' : ''; |
|
| 200 | + $set_charset = (float)$GLOBALS['egw_setup']->db->ServerInfo['version'] >= 4.1 ? ' DEFAULT CHARACTER SET utf8' : ''; |
|
| 202 | 201 | $setup_tpl->set_var('instr', |
| 203 | - '<b>'.lang("Instructions for creating the database in %1:",'MySql').'</b>' |
|
| 202 | + '<b>'.lang("Instructions for creating the database in %1:", 'MySql').'</b>' |
|
| 204 | 203 | . '<br />'.lang('Login to mysql -') |
| 205 | 204 | . '<br /><i>[user@server user]# <b>mysql -u root -p</b></i><br />' |
| 206 | 205 | . lang('Create the empty database and grant user permissions -') |
| 207 | 206 | . "<br /><i>mysql> <b>CREATE DATABASE $info[db_name]$set_charset;</b></i>" |
| 208 | - . "<br /><i>mysql> <b>GRANT ALL ON " . $info['db_name'] |
|
| 209 | - . ".* TO " . $info['db_user'] . "@localhost IDENTIFIED BY '" . $info['db_pass'] . "';</b></i>"); |
|
| 210 | - $setup_tpl->parse('V_db_stage_1','B_db_stage_1'); |
|
| 207 | + . "<br /><i>mysql> <b>GRANT ALL ON ".$info['db_name'] |
|
| 208 | + . ".* TO ".$info['db_user']."@localhost IDENTIFIED BY '".$info['db_pass']."';</b></i>"); |
|
| 209 | + $setup_tpl->parse('V_db_stage_1', 'B_db_stage_1'); |
|
| 211 | 210 | break; |
| 212 | 211 | case 'pgsql': |
| 213 | 212 | $ip = $info['db_host'] == 'localhost' ? '127.0.0.1' : '<ip-address webserver>'; |
| 214 | 213 | $setup_tpl->set_var('instr', |
| 215 | - '<b>'.lang('Instructions for creating the database in %1:','PostgreSQL').'</b>' |
|
| 214 | + '<b>'.lang('Instructions for creating the database in %1:', 'PostgreSQL').'</b>' |
|
| 216 | 215 | . '<br />'.lang('Login as user postgres, eg. by using su as root') |
| 217 | 216 | . "<br /><i>[root@server /root]# <b>su - postgres</b></i><br />" |
| 218 | 217 | . lang('Create the empty database and grant user permissions -') |
| 219 | - . "<br /><i>[postgres@server /var/lib/pgsql]\$ <b>createuser --no-adduser --no-createdb -P " . $info['db_user'] . "</b></i>" |
|
| 220 | - . "<br /><i>Enter password for new user: <b>" . $info['db_pass'] . "</b></i>" |
|
| 221 | - . "<br /><i>[postgres@server /var/lib/pgsql]\$ <b>createdb --encoding=utf-8 --owner " . $info['db_user'] . ' ' . $info['db_name'] . "</b></i>" |
|
| 218 | + . "<br /><i>[postgres@server /var/lib/pgsql]\$ <b>createuser --no-adduser --no-createdb -P ".$info['db_user']."</b></i>" |
|
| 219 | + . "<br /><i>Enter password for new user: <b>".$info['db_pass']."</b></i>" |
|
| 220 | + . "<br /><i>[postgres@server /var/lib/pgsql]\$ <b>createdb --encoding=utf-8 --owner ".$info['db_user'].' '.$info['db_name']."</b></i>" |
|
| 222 | 221 | . '<br />'.lang('to allow password authentification add the following line to your pg_hba.conf (above all others) AND restart postgres:') |
| 223 | 222 | . '<br /><i># TYPE DATABASE USER CIDR-ADDRESS METHOD</i>' |
| 224 | - .($info['db_host'] ? "<br /><i><b>host $info[db_name] $info[db_user] $ip/32 password</b></i>" : |
|
| 225 | - "<br /><i><b>local $info[db_name] $info[db_user] password</b></i>")); |
|
| 223 | + .($info['db_host'] ? "<br /><i><b>host $info[db_name] $info[db_user] $ip/32 password</b></i>" : "<br /><i><b>local $info[db_name] $info[db_user] password</b></i>")); |
|
| 226 | 224 | //$setup_tpl->parse('V_db_stage_1','B_db_stage_1'); |
| 227 | 225 | //break; |
| 228 | 226 | default: |
| 229 | - $setup_tpl->parse('V_db_stage_1','B_db_stage_1a'); |
|
| 227 | + $setup_tpl->parse('V_db_stage_1', 'B_db_stage_1a'); |
|
| 230 | 228 | } |
| 231 | 229 | $db_filled_block = $setup_tpl->get_var('V_db_stage_1'); |
| 232 | - $setup_tpl->set_var('V_db_filled_block',$db_filled_block); |
|
| 230 | + $setup_tpl->set_var('V_db_filled_block', $db_filled_block); |
|
| 233 | 231 | break; |
| 234 | 232 | case 2: |
| 235 | - $setup_tpl->set_var('prebeta',lang('You appear to be running a pre-beta version of EGroupware.<br />These versions are no longer supported, and there is no upgrade path for them in setup.<br /> You may wish to first upgrade to 0.9.10 (the last version to support pre-beta upgrades) <br />and then upgrade from there with the current version.')); |
|
| 236 | - $setup_tpl->set_var('notcomplete',lang('not complete')); |
|
| 237 | - $setup_tpl->parse('V_db_stage_2','B_db_stage_2'); |
|
| 233 | + $setup_tpl->set_var('prebeta', lang('You appear to be running a pre-beta version of EGroupware.<br />These versions are no longer supported, and there is no upgrade path for them in setup.<br /> You may wish to first upgrade to 0.9.10 (the last version to support pre-beta upgrades) <br />and then upgrade from there with the current version.')); |
|
| 234 | + $setup_tpl->set_var('notcomplete', lang('not complete')); |
|
| 235 | + $setup_tpl->parse('V_db_stage_2', 'B_db_stage_2'); |
|
| 238 | 236 | $db_filled_block = $setup_tpl->get_var('V_db_stage_2'); |
| 239 | - $setup_tpl->set_var('V_db_filled_block',$db_filled_block); |
|
| 237 | + $setup_tpl->set_var('V_db_filled_block', $db_filled_block); |
|
| 240 | 238 | break; |
| 241 | 239 | case 3: |
| 242 | - $setup_tpl->set_var('dbexists','<b>'.lang('Your database is working, but you dont have any applications installed').'</b>'); |
|
| 243 | - $setup_tpl->set_var('install',lang('Install')); |
|
| 244 | - $setup_tpl->set_var('proceed',lang('We can proceed')); |
|
| 245 | - $setup_tpl->set_var('coreapps',lang('all applications')); |
|
| 246 | - $setup_tpl->set_var('lang_debug',lang('enable for extra debug-messages')); |
|
| 247 | - $setup_tpl->set_var('lang_restore',lang('Or you can install a previous backup.')); |
|
| 248 | - $setup_tpl->set_var('upload','<input type="file" name="uploaded" /> '. |
|
| 240 | + $setup_tpl->set_var('dbexists', '<b>'.lang('Your database is working, but you dont have any applications installed').'</b>'); |
|
| 241 | + $setup_tpl->set_var('install', lang('Install')); |
|
| 242 | + $setup_tpl->set_var('proceed', lang('We can proceed')); |
|
| 243 | + $setup_tpl->set_var('coreapps', lang('all applications')); |
|
| 244 | + $setup_tpl->set_var('lang_debug', lang('enable for extra debug-messages')); |
|
| 245 | + $setup_tpl->set_var('lang_restore', lang('Or you can install a previous backup.')); |
|
| 246 | + $setup_tpl->set_var('upload', '<input type="file" name="uploaded" /> '. |
|
| 249 | 247 | '<input type="submit" name="upload" value="'.htmlspecialchars(lang('install backup')).'" title="'.htmlspecialchars(lang("uploads a backup and installs it on your DB")).'" />'); |
| 250 | - $setup_tpl->set_var('convert_checkbox','<input type="checkbox" name="convert_charset" id="convert_checkbox" value="1"/>'); |
|
| 251 | - $setup_tpl->set_var('lang_convert_charset','<label for="convert_checkbox">'. |
|
| 248 | + $setup_tpl->set_var('convert_checkbox', '<input type="checkbox" name="convert_charset" id="convert_checkbox" value="1"/>'); |
|
| 249 | + $setup_tpl->set_var('lang_convert_charset', '<label for="convert_checkbox">'. |
|
| 252 | 250 | lang('Convert backup to charset selected above').'</label>'); |
| 253 | - $setup_tpl->parse('V_db_stage_3','B_db_stage_3'); |
|
| 251 | + $setup_tpl->parse('V_db_stage_3', 'B_db_stage_3'); |
|
| 254 | 252 | $db_filled_block = $setup_tpl->get_var('V_db_stage_3'); |
| 255 | - $setup_tpl->set_var('V_db_filled_block',$db_filled_block); |
|
| 253 | + $setup_tpl->set_var('V_db_filled_block', $db_filled_block); |
|
| 256 | 254 | break; |
| 257 | 255 | case 4: |
| 258 | 256 | $setup_tpl->set_var('hidden_vars', Api\Html::input_hidden('csrf_token', Api\Csrf::token(__FILE__))); |
| 259 | - $setup_tpl->set_var('oldver',lang('You appear to be running version %1 of EGroupware', |
|
| 257 | + $setup_tpl->set_var('oldver', lang('You appear to be running version %1 of EGroupware', |
|
| 260 | 258 | isset($setup_info['api']['currentver']) ? $setup_info['api']['currentver'] : $setup_info['phpgwapi']['currentver'])); |
| 261 | - $setup_tpl->set_var('automatic',lang('We will automatically update your tables/records to %1',$setup_info['api']['version'])); |
|
| 262 | - $setup_tpl->set_var('backupwarn',lang('but we <u>highly recommend backing up</u> your tables in case the script causes damage to your data.<br /><strong>These automated scripts can easily destroy your data.</strong>')); |
|
| 263 | - $setup_tpl->set_var('lang_backup',lang('create a backup before upgrading the DB')); |
|
| 264 | - $setup_tpl->set_var('lang_debug',lang('enable for extra debug-messages')); |
|
| 265 | - $setup_tpl->set_var('upgrade',lang('Upgrade')); |
|
| 266 | - $setup_tpl->set_var('goto',lang('Go to')); |
|
| 267 | - $setup_tpl->set_var('configuration',lang('configuration')); |
|
| 268 | - $setup_tpl->set_var('admin_account',lang('Create admin account')); |
|
| 269 | - $setup_tpl->set_var('applications',lang('Manage Applications')); |
|
| 270 | - $setup_tpl->set_var('db_backup',lang('DB backup and restore')); |
|
| 271 | - $setup_tpl->set_var('language_management',lang('Manage Languages')); |
|
| 272 | - $setup_tpl->set_var('uninstall_all_applications',lang('Uninstall all applications')); |
|
| 273 | - $setup_tpl->set_var('dont_touch_my_data',lang('Dont touch my data')); |
|
| 274 | - $setup_tpl->set_var('dropwarn',lang('Your tables will be dropped and you will lose data')); |
|
| 259 | + $setup_tpl->set_var('automatic', lang('We will automatically update your tables/records to %1', $setup_info['api']['version'])); |
|
| 260 | + $setup_tpl->set_var('backupwarn', lang('but we <u>highly recommend backing up</u> your tables in case the script causes damage to your data.<br /><strong>These automated scripts can easily destroy your data.</strong>')); |
|
| 261 | + $setup_tpl->set_var('lang_backup', lang('create a backup before upgrading the DB')); |
|
| 262 | + $setup_tpl->set_var('lang_debug', lang('enable for extra debug-messages')); |
|
| 263 | + $setup_tpl->set_var('upgrade', lang('Upgrade')); |
|
| 264 | + $setup_tpl->set_var('goto', lang('Go to')); |
|
| 265 | + $setup_tpl->set_var('configuration', lang('configuration')); |
|
| 266 | + $setup_tpl->set_var('admin_account', lang('Create admin account')); |
|
| 267 | + $setup_tpl->set_var('applications', lang('Manage Applications')); |
|
| 268 | + $setup_tpl->set_var('db_backup', lang('DB backup and restore')); |
|
| 269 | + $setup_tpl->set_var('language_management', lang('Manage Languages')); |
|
| 270 | + $setup_tpl->set_var('uninstall_all_applications', lang('Uninstall all applications')); |
|
| 271 | + $setup_tpl->set_var('dont_touch_my_data', lang('Dont touch my data')); |
|
| 272 | + $setup_tpl->set_var('dropwarn', lang('Your tables will be dropped and you will lose data')); |
|
| 275 | 273 | |
| 276 | - $setup_tpl->parse('V_db_stage_4','B_db_stage_4'); |
|
| 274 | + $setup_tpl->parse('V_db_stage_4', 'B_db_stage_4'); |
|
| 277 | 275 | $db_filled_block = $setup_tpl->get_var('V_db_stage_4'); |
| 278 | - $setup_tpl->set_var('V_db_filled_block',$db_filled_block); |
|
| 276 | + $setup_tpl->set_var('V_db_filled_block', $db_filled_block); |
|
| 279 | 277 | break; |
| 280 | 278 | case 5: |
| 281 | 279 | $setup_tpl->set_var('hidden_vars', Api\Html::input_hidden('csrf_token', Api\Csrf::token(__FILE__))); |
| 282 | - $setup_tpl->set_var('are_you_sure',lang('ARE YOU SURE?')); |
|
| 283 | - $setup_tpl->set_var('really_uninstall_all_applications',lang('REALLY Uninstall all applications')); |
|
| 284 | - $setup_tpl->set_var('dropwarn',lang('Your tables will be dropped and you will lose data')); |
|
| 285 | - $setup_tpl->set_var('cancel',lang('cancel')); |
|
| 286 | - $setup_tpl->parse('V_db_stage_5','B_db_stage_5'); |
|
| 280 | + $setup_tpl->set_var('are_you_sure', lang('ARE YOU SURE?')); |
|
| 281 | + $setup_tpl->set_var('really_uninstall_all_applications', lang('REALLY Uninstall all applications')); |
|
| 282 | + $setup_tpl->set_var('dropwarn', lang('Your tables will be dropped and you will lose data')); |
|
| 283 | + $setup_tpl->set_var('cancel', lang('cancel')); |
|
| 284 | + $setup_tpl->parse('V_db_stage_5', 'B_db_stage_5'); |
|
| 287 | 285 | $db_filled_block = $setup_tpl->get_var('V_db_stage_5'); |
| 288 | - $setup_tpl->set_var('V_db_filled_block',$db_filled_block); |
|
| 286 | + $setup_tpl->set_var('V_db_filled_block', $db_filled_block); |
|
| 289 | 287 | break; |
| 290 | 288 | case 6: |
| 291 | - $setup_tpl->set_var('status',lang('Status')); |
|
| 292 | - $setup_tpl->set_var('notcomplete',lang('not complete')); |
|
| 293 | - $setup_tpl->set_var('tblchange',lang('Table Change Messages')); |
|
| 294 | - $setup_tpl->parse('V_db_stage_6_pre','B_db_stage_6_pre'); |
|
| 289 | + $setup_tpl->set_var('status', lang('Status')); |
|
| 290 | + $setup_tpl->set_var('notcomplete', lang('not complete')); |
|
| 291 | + $setup_tpl->set_var('tblchange', lang('Table Change Messages')); |
|
| 292 | + $setup_tpl->parse('V_db_stage_6_pre', 'B_db_stage_6_pre'); |
|
| 295 | 293 | $db_filled_block = $setup_tpl->get_var('V_db_stage_6_pre'); |
| 296 | - $setup_tpl->set_var('tableshave',lang('If you did not receive any errors, your applications have been')); |
|
| 294 | + $setup_tpl->set_var('tableshave', lang('If you did not receive any errors, your applications have been')); |
|
| 297 | 295 | |
| 298 | 296 | try { // catch DB errors to report them |
| 299 | 297 | switch ($GLOBALS['egw_info']['setup']['currentver']['phpgwapi']) |
| 300 | 298 | { |
| 301 | 299 | case 'dbcreate': |
| 302 | - $GLOBALS['egw_setup']->db->create_database($_POST['db_root'], $_POST['db_pass'], 'utf8', // create all new db's with utf8 |
|
| 300 | + $GLOBALS['egw_setup']->db->create_database($_POST['db_root'], $_POST['db_pass'], 'utf8', // create all new db's with utf8 |
|
| 303 | 301 | !preg_match('/^[0-9.a-z_]+$/i', $_POST['db_grant_host']) ? 'localhost' : $_POST['db_grant_host']); |
| 304 | 302 | break; |
| 305 | 303 | case 'drop': |
@@ -315,25 +313,25 @@ discard block |
||
| 315 | 313 | if (is_array($_FILES['uploaded']) && !$_FILES['uploaded']['error'] && |
| 316 | 314 | is_uploaded_file($_FILES['uploaded']['tmp_name'])) |
| 317 | 315 | { |
| 318 | - if (preg_match('/\.(bz2|gz)$/i',$_FILES['uploaded']['name'],$matches)) |
|
| 316 | + if (preg_match('/\.(bz2|gz)$/i', $_FILES['uploaded']['name'], $matches)) |
|
| 319 | 317 | { |
| 320 | 318 | $ext = '.'.$matches[1]; |
| 321 | - move_uploaded_file($_FILES['uploaded']['tmp_name'],$_FILES['uploaded']['tmp_name'].$ext); |
|
| 319 | + move_uploaded_file($_FILES['uploaded']['tmp_name'], $_FILES['uploaded']['tmp_name'].$ext); |
|
| 322 | 320 | $_FILES['uploaded']['tmp_name'] .= $ext; |
| 323 | 321 | } |
| 324 | - if (is_resource($f = $db_backup->fopen_backup($_FILES['uploaded']['tmp_name'],true))) |
|
| 322 | + if (is_resource($f = $db_backup->fopen_backup($_FILES['uploaded']['tmp_name'], true))) |
|
| 325 | 323 | { |
| 326 | - echo '<p align="center">'.lang('restore started, this might take a few minutes ...')."</p>\n".str_repeat(' ',4096); |
|
| 327 | - $db_backup->restore($f,$_POST['convert_charset'],$_FILES['uploaded']['tmp_name'],false); |
|
| 324 | + echo '<p align="center">'.lang('restore started, this might take a few minutes ...')."</p>\n".str_repeat(' ', 4096); |
|
| 325 | + $db_backup->restore($f, $_POST['convert_charset'], $_FILES['uploaded']['tmp_name'], false); |
|
| 328 | 326 | fclose($f); |
| 329 | 327 | echo '<p align="center">'.lang('restore finished')."</p>\n"; |
| 330 | 328 | unlink($_FILES['uploaded']['tmp_name']); |
| 331 | 329 | } |
| 332 | 330 | else // backup failed ==> dont start the upgrade |
| 333 | 331 | { |
| 334 | - $setup_tpl->set_var('submsg',lang('Restore failed')); |
|
| 335 | - $setup_tpl->set_var('tableshave','<b>'.$f.'</b>'); |
|
| 336 | - $setup_tpl->set_var('subaction',''); |
|
| 332 | + $setup_tpl->set_var('submsg', lang('Restore failed')); |
|
| 333 | + $setup_tpl->set_var('tableshave', '<b>'.$f.'</b>'); |
|
| 334 | + $setup_tpl->set_var('subaction', ''); |
|
| 337 | 335 | } |
| 338 | 336 | } |
| 339 | 337 | } |
@@ -346,7 +344,7 @@ discard block |
||
| 346 | 344 | $GLOBALS['egw_setup']->system_charset = $_REQUEST['system_charset']; |
| 347 | 345 | $GLOBALS['egw_setup']->db->Link_ID->SetCharSet($_REQUEST['system_charset']); |
| 348 | 346 | } |
| 349 | - $setup_info = $GLOBALS['egw_setup']->process->pass($s_info,'new',$_REQUEST['debug'],True); |
|
| 347 | + $setup_info = $GLOBALS['egw_setup']->process->pass($s_info, 'new', $_REQUEST['debug'], True); |
|
| 350 | 348 | $GLOBALS['egw_info']['setup']['currentver']['phpgwapi'] = 'oldversion'; |
| 351 | 349 | } |
| 352 | 350 | break; |
@@ -358,21 +356,21 @@ discard block |
||
| 358 | 356 | $db_backup = new Api\Db\Backup(); |
| 359 | 357 | if (is_resource($f = $db_backup->fopen_backup())) |
| 360 | 358 | { |
| 361 | - echo '<p align="center">'.lang('backup started, this might take a few minutes ...')."</p>\n".str_repeat(' ',4096); |
|
| 359 | + echo '<p align="center">'.lang('backup started, this might take a few minutes ...')."</p>\n".str_repeat(' ', 4096); |
|
| 362 | 360 | $db_backup->backup($f); |
| 363 | 361 | fclose($f); |
| 364 | 362 | echo '<p align="center">'.lang('backup finished')."</p>\n"; |
| 365 | 363 | } |
| 366 | 364 | else // backup failed ==> dont start the upgrade |
| 367 | 365 | { |
| 368 | - $setup_tpl->set_var('submsg',lang('Backup failed')); |
|
| 369 | - $setup_tpl->set_var('tableshave','<b>'.$f.'</b>'); |
|
| 370 | - $setup_tpl->set_var('subaction',''); |
|
| 366 | + $setup_tpl->set_var('submsg', lang('Backup failed')); |
|
| 367 | + $setup_tpl->set_var('tableshave', '<b>'.$f.'</b>'); |
|
| 368 | + $setup_tpl->set_var('subaction', ''); |
|
| 371 | 369 | } |
| 372 | 370 | } |
| 373 | 371 | if (!@$_POST['backup'] || !is_string($f)) |
| 374 | 372 | { |
| 375 | - $setup_info = $GLOBALS['egw_setup']->process->pass($setup_info,'upgrade',$_REQUEST['debug']); |
|
| 373 | + $setup_info = $GLOBALS['egw_setup']->process->pass($setup_info, 'upgrade', $_REQUEST['debug']); |
|
| 376 | 374 | $GLOBALS['egw_info']['setup']['currentver']['phpgwapi'] = 'oldversion'; |
| 377 | 375 | } |
| 378 | 376 | break; |
@@ -382,159 +380,159 @@ discard block |
||
| 382 | 380 | { |
| 383 | 381 | echo "<pre>".$e->getMessage()."</pre>\n"; |
| 384 | 382 | } |
| 385 | - $setup_tpl->set_var('re-check_my_installation',lang('Re-Check My Installation')); |
|
| 386 | - $setup_tpl->set_var('system_charset',$GLOBALS['egw']->system_charset); |
|
| 387 | - $setup_tpl->parse('V_db_stage_6_post','B_db_stage_6_post'); |
|
| 388 | - $db_filled_block = $db_filled_block . $setup_tpl->get_var('V_db_stage_6_post'); |
|
| 389 | - $setup_tpl->set_var('V_db_filled_block',$db_filled_block); |
|
| 383 | + $setup_tpl->set_var('re-check_my_installation', lang('Re-Check My Installation')); |
|
| 384 | + $setup_tpl->set_var('system_charset', $GLOBALS['egw']->system_charset); |
|
| 385 | + $setup_tpl->parse('V_db_stage_6_post', 'B_db_stage_6_post'); |
|
| 386 | + $db_filled_block = $db_filled_block.$setup_tpl->get_var('V_db_stage_6_post'); |
|
| 387 | + $setup_tpl->set_var('V_db_filled_block', $db_filled_block); |
|
| 390 | 388 | break; |
| 391 | 389 | case 10: |
| 392 | - $setup_tpl->set_var('tablescurrent',lang('Your EGroupware API is current')); |
|
| 393 | - $setup_tpl->set_var('uninstall_all_applications',lang('Uninstall all applications')); |
|
| 394 | - $setup_tpl->set_var('dropwarn',lang('Your tables will be dropped and you will lose data')); |
|
| 395 | - $setup_tpl->set_var('deletetables',lang('Uninstall all applications')); |
|
| 396 | - $setup_tpl->parse('V_db_stage_10','B_db_stage_10'); |
|
| 390 | + $setup_tpl->set_var('tablescurrent', lang('Your EGroupware API is current')); |
|
| 391 | + $setup_tpl->set_var('uninstall_all_applications', lang('Uninstall all applications')); |
|
| 392 | + $setup_tpl->set_var('dropwarn', lang('Your tables will be dropped and you will lose data')); |
|
| 393 | + $setup_tpl->set_var('deletetables', lang('Uninstall all applications')); |
|
| 394 | + $setup_tpl->parse('V_db_stage_10', 'B_db_stage_10'); |
|
| 397 | 395 | $db_filled_block = $setup_tpl->get_var('V_db_stage_10'); |
| 398 | - $setup_tpl->set_var('V_db_filled_block',$db_filled_block); |
|
| 396 | + $setup_tpl->set_var('V_db_filled_block', $db_filled_block); |
|
| 399 | 397 | break; |
| 400 | 398 | default: |
| 401 | - $setup_tpl->set_var('dbnotexist',lang('Your database does not exist')); |
|
| 402 | - $setup_tpl->parse('V_db_stage_default','B_db_stage_default'); |
|
| 399 | + $setup_tpl->set_var('dbnotexist', lang('Your database does not exist')); |
|
| 400 | + $setup_tpl->parse('V_db_stage_default', 'B_db_stage_default'); |
|
| 403 | 401 | $db_filled_block = $setup_tpl->get_var('V_db_stage_default'); |
| 404 | - $setup_tpl->set_var('V_db_filled_block',$db_filled_block); |
|
| 402 | + $setup_tpl->set_var('V_db_filled_block', $db_filled_block); |
|
| 405 | 403 | break; |
| 406 | 404 | } |
| 407 | 405 | |
| 408 | 406 | // Config Section |
| 409 | -$setup_tpl->set_var('config_step_text',lang('Step %1 - Configuration', ++$num)); |
|
| 407 | +$setup_tpl->set_var('config_step_text', lang('Step %1 - Configuration', ++$num)); |
|
| 410 | 408 | $GLOBALS['egw_info']['setup']['stage']['config'] = $GLOBALS['egw_setup']->detection->check_config(); |
| 411 | 409 | |
| 412 | 410 | // begin DEBUG code |
| 413 | 411 | //$GLOBALS['egw_info']['setup']['stage']['config'] = 10; |
| 414 | 412 | // end DEBUG code |
| 415 | 413 | |
| 416 | -$setup_tpl->set_var('config_status_img',$incomplete); |
|
| 417 | -$setup_tpl->set_var('config_status_alt',lang('not completed')); |
|
| 418 | -switch($GLOBALS['egw_info']['setup']['stage']['config']) |
|
| 414 | +$setup_tpl->set_var('config_status_img', $incomplete); |
|
| 415 | +$setup_tpl->set_var('config_status_alt', lang('not completed')); |
|
| 416 | +switch ($GLOBALS['egw_info']['setup']['stage']['config']) |
|
| 419 | 417 | { |
| 420 | 418 | case 1: // AFAIK this dont happen any more, as we have setup_process::save_minimal_config() now -- RalfBecker |
| 421 | 419 | $btn_config_now = $GLOBALS['egw_setup']->html->make_frm_btn_simple( |
| 422 | 420 | lang('Please configure EGroupware for your environment'), |
| 423 | - 'post','config.php', |
|
| 424 | - 'submit',lang('Configure Now'), |
|
| 421 | + 'post', 'config.php', |
|
| 422 | + 'submit', lang('Configure Now'), |
|
| 425 | 423 | ''); |
| 426 | - $setup_tpl->set_var('config_table_data',$btn_config_now); |
|
| 424 | + $setup_tpl->set_var('config_table_data', $btn_config_now); |
|
| 427 | 425 | break; |
| 428 | 426 | case 10: |
| 429 | - $setup_tpl->set_var('config_status_img',$completed); |
|
| 430 | - $setup_tpl->set_var('config_status_alt',lang('completed')); |
|
| 427 | + $setup_tpl->set_var('config_status_img', $completed); |
|
| 428 | + $setup_tpl->set_var('config_status_alt', lang('completed')); |
|
| 431 | 429 | $config_msg = lang('Configuration completed'); |
| 432 | 430 | case 2: |
| 433 | 431 | if ($GLOBALS['egw_info']['setup']['config_errors']) |
| 434 | 432 | { |
| 435 | - $config_msg = implode('<br />',$GLOBALS['egw_info']['setup']['config_errors']); |
|
| 433 | + $config_msg = implode('<br />', $GLOBALS['egw_info']['setup']['config_errors']); |
|
| 436 | 434 | } |
| 437 | 435 | $btn_edit_config = $GLOBALS['egw_setup']->html->make_frm_btn_simple( |
| 438 | 436 | $config_msg, |
| 439 | - 'post','config.php', |
|
| 440 | - 'submit',lang('Edit Current Configuration'), |
|
| 437 | + 'post', 'config.php', |
|
| 438 | + 'submit', lang('Edit Current Configuration'), |
|
| 441 | 439 | '' |
| 442 | 440 | ); |
| 443 | - $setup_tpl->set_var('config_table_data',$btn_edit_config); |
|
| 441 | + $setup_tpl->set_var('config_table_data', $btn_edit_config); |
|
| 444 | 442 | break; |
| 445 | 443 | default: |
| 446 | - $setup_tpl->set_var('config_status_img',$incomplete); |
|
| 447 | - $setup_tpl->set_var('config_status_alt',lang('not completed')); |
|
| 448 | - $setup_tpl->set_var('config_table_data',lang('Not ready for this stage yet')); |
|
| 444 | + $setup_tpl->set_var('config_status_img', $incomplete); |
|
| 445 | + $setup_tpl->set_var('config_status_alt', lang('not completed')); |
|
| 446 | + $setup_tpl->set_var('config_table_data', lang('Not ready for this stage yet')); |
|
| 449 | 447 | break; |
| 450 | 448 | } |
| 451 | 449 | // Admin Account Section |
| 452 | -$setup_tpl->set_var('admin_step_text',lang('Step %1 - Admin Account', ++$num)); |
|
| 450 | +$setup_tpl->set_var('admin_step_text', lang('Step %1 - Admin Account', ++$num)); |
|
| 453 | 451 | |
| 454 | -switch($GLOBALS['egw_info']['setup']['stage']['config']) |
|
| 452 | +switch ($GLOBALS['egw_info']['setup']['stage']['config']) |
|
| 455 | 453 | { |
| 456 | 454 | case 10: |
| 457 | 455 | // check if there is already a user account (not the anonymous account of sitemgr or a group) |
| 458 | 456 | $no_accounts = !$GLOBALS['egw_setup']->accounts_exist(); |
| 459 | - $setup_tpl->set_var('admin_status_img',$no_accounts ? $incomplete : $completed); |
|
| 460 | - $setup_tpl->set_var('admin_status_alt',$no_accounts ? lang('not completed') : lang('completed')); |
|
| 461 | - $setup_tpl->set_var('admin_table_data',$GLOBALS['egw_setup']->html->make_frm_btn_simple( |
|
| 457 | + $setup_tpl->set_var('admin_status_img', $no_accounts ? $incomplete : $completed); |
|
| 458 | + $setup_tpl->set_var('admin_status_alt', $no_accounts ? lang('not completed') : lang('completed')); |
|
| 459 | + $setup_tpl->set_var('admin_table_data', $GLOBALS['egw_setup']->html->make_frm_btn_simple( |
|
| 462 | 460 | $no_accounts ? lang('No accounts existing') : lang('Accounts existing'), |
| 463 | - 'post','admin_account.php', |
|
| 464 | - 'submit',lang('Create admin account'), |
|
| 461 | + 'post', 'admin_account.php', |
|
| 462 | + 'submit', lang('Create admin account'), |
|
| 465 | 463 | '' |
| 466 | 464 | )); |
| 467 | 465 | break; |
| 468 | 466 | default: |
| 469 | - $setup_tpl->set_var('admin_status_img',$incomplete); |
|
| 470 | - $setup_tpl->set_var('admin_status_alt',lang('not completed')); |
|
| 471 | - $setup_tpl->set_var('admin_table_data',lang('Not ready for this stage yet')); |
|
| 467 | + $setup_tpl->set_var('admin_status_img', $incomplete); |
|
| 468 | + $setup_tpl->set_var('admin_status_alt', lang('not completed')); |
|
| 469 | + $setup_tpl->set_var('admin_table_data', lang('Not ready for this stage yet')); |
|
| 472 | 470 | break; |
| 473 | 471 | } |
| 474 | 472 | |
| 475 | -$setup_tpl->set_var('apps_step_text',lang('Step %1 - Advanced Application Management', ++$num)); |
|
| 473 | +$setup_tpl->set_var('apps_step_text', lang('Step %1 - Advanced Application Management', ++$num)); |
|
| 476 | 474 | // $GLOBALS['egw_info']['setup']['stage']['apps'] = $GLOBALS['egw_setup']->check_apps(); |
| 477 | -switch($GLOBALS['egw_info']['setup']['stage']['db']) |
|
| 475 | +switch ($GLOBALS['egw_info']['setup']['stage']['db']) |
|
| 478 | 476 | { |
| 479 | 477 | case 10: |
| 480 | - $setup_tpl->set_var('apps_status_img',$completed); |
|
| 481 | - $setup_tpl->set_var('apps_status_alt',lang('completed')); |
|
| 478 | + $setup_tpl->set_var('apps_status_img', $completed); |
|
| 479 | + $setup_tpl->set_var('apps_status_alt', lang('completed')); |
|
| 482 | 480 | // check if we have apps to upgrade or essential apps not installed |
| 483 | 481 | $to_upgrade = $to_install = array(); |
| 484 | - foreach($setup_info as $app => $data) |
|
| 482 | + foreach ($setup_info as $app => $data) |
|
| 485 | 483 | { |
| 486 | 484 | if ($data['currentver'] && $data['version'] && $data['version'] != $data['currentver']) |
| 487 | 485 | { |
| 488 | 486 | $to_upgrade[] = lang(!empty($data['title']) ? $data['title'] : $app); |
| 489 | - $setup_tpl->set_var('apps_status_img',$incomplete); |
|
| 487 | + $setup_tpl->set_var('apps_status_img', $incomplete); |
|
| 490 | 488 | } |
| 491 | 489 | } |
| 492 | 490 | // warn if essential apps are not installed |
| 493 | - foreach(array('api','admin','preferences') as $app) |
|
| 491 | + foreach (array('api', 'admin', 'preferences') as $app) |
|
| 494 | 492 | { |
| 495 | 493 | if (!isset($setup_info[$app]) || empty($setup_info[$app]['currentver'])) |
| 496 | 494 | { |
| 497 | 495 | $to_install[] = lang($app); |
| 498 | - $setup_tpl->set_var('apps_status_img',$incomplete); |
|
| 496 | + $setup_tpl->set_var('apps_status_img', $incomplete); |
|
| 499 | 497 | } |
| 500 | 498 | } |
| 501 | 499 | $msg = ''; |
| 502 | 500 | if ($to_upgrade || $to_install) |
| 503 | 501 | { |
| 504 | - if ($to_upgrade) $msg = '<b>'.lang('The following applications need to be upgraded:').'</b> '.implode(', ',$to_upgrade); |
|
| 505 | - if ($to_install) $msg .= ($msg?'<br />':'').'<b>'.lang('The following applications are required, but NOT installed:').'</b> '.implode(', ',$to_install); |
|
| 502 | + if ($to_upgrade) $msg = '<b>'.lang('The following applications need to be upgraded:').'</b> '.implode(', ', $to_upgrade); |
|
| 503 | + if ($to_install) $msg .= ($msg ? '<br />' : '').'<b>'.lang('The following applications are required, but NOT installed:').'</b> '.implode(', ', $to_install); |
|
| 506 | 504 | } |
| 507 | 505 | $btn_manage_apps = $GLOBALS['egw_setup']->html->make_frm_btn_simple( |
| 508 | 506 | $msg ? $msg : lang('This stage is completed<br />'), |
| 509 | - 'post','applications.php', |
|
| 510 | - 'submit',lang('Manage Applications'), |
|
| 507 | + 'post', 'applications.php', |
|
| 508 | + 'submit', lang('Manage Applications'), |
|
| 511 | 509 | ''); |
| 512 | - $setup_tpl->set_var('apps_table_data',$btn_manage_apps); |
|
| 510 | + $setup_tpl->set_var('apps_table_data', $btn_manage_apps); |
|
| 513 | 511 | break; |
| 514 | 512 | default: |
| 515 | - $setup_tpl->set_var('apps_status_img',$incomplete); |
|
| 516 | - $setup_tpl->set_var('apps_status_alt',lang('not completed')); |
|
| 517 | - $setup_tpl->set_var('apps_table_data',lang('Not ready for this stage yet')); |
|
| 513 | + $setup_tpl->set_var('apps_status_img', $incomplete); |
|
| 514 | + $setup_tpl->set_var('apps_status_alt', lang('not completed')); |
|
| 515 | + $setup_tpl->set_var('apps_table_data', lang('Not ready for this stage yet')); |
|
| 518 | 516 | break; |
| 519 | 517 | } |
| 520 | 518 | // Backup and restore section |
| 521 | -$setup_tpl->set_var('backup_step_text',lang('Step %1 - DB backup and restore', ++$num)); |
|
| 519 | +$setup_tpl->set_var('backup_step_text', lang('Step %1 - DB backup and restore', ++$num)); |
|
| 522 | 520 | if ($GLOBALS['egw_info']['setup']['stage']['db'] == 10 && !$no_backup_dir) |
| 523 | 521 | { |
| 524 | - $setup_tpl->set_var('backup_status_img',$completed); |
|
| 525 | - $setup_tpl->set_var('backup_status_alt',lang('completed')); |
|
| 526 | - $setup_tpl->set_var('backup_table_data',$GLOBALS['egw_setup']->html->make_frm_btn_simple( |
|
| 522 | + $setup_tpl->set_var('backup_status_img', $completed); |
|
| 523 | + $setup_tpl->set_var('backup_status_alt', lang('completed')); |
|
| 524 | + $setup_tpl->set_var('backup_table_data', $GLOBALS['egw_setup']->html->make_frm_btn_simple( |
|
| 527 | 525 | ''/*lang('This stage is completed<br />')*/, |
| 528 | - 'post','db_backup.php', |
|
| 529 | - 'submit',lang('backup and restore'), |
|
| 526 | + 'post', 'db_backup.php', |
|
| 527 | + 'submit', lang('backup and restore'), |
|
| 530 | 528 | '')); |
| 531 | 529 | } |
| 532 | 530 | else |
| 533 | 531 | { |
| 534 | - $setup_tpl->set_var('backup_status_img',$incomplete); |
|
| 535 | - $setup_tpl->set_var('backup_status_alt',lang('not completed')); |
|
| 536 | - $setup_tpl->set_var('backup_table_data',$no_backup_dir ? $no_backup_dir : lang('Not ready for this stage yet')); |
|
| 532 | + $setup_tpl->set_var('backup_status_img', $incomplete); |
|
| 533 | + $setup_tpl->set_var('backup_status_alt', lang('not completed')); |
|
| 534 | + $setup_tpl->set_var('backup_table_data', $no_backup_dir ? $no_backup_dir : lang('Not ready for this stage yet')); |
|
| 537 | 535 | } |
| 538 | 536 | |
| 539 | -$setup_tpl->pparse('out','T_setup_main'); |
|
| 537 | +$setup_tpl->pparse('out', 'T_setup_main'); |
|
| 540 | 538 | $GLOBALS['egw_setup']->html->show_footer(); |
@@ -350,7 +350,7 @@ |
||
| 350 | 350 | { |
| 351 | 351 | echo lang('because it depends upon') . ':<br />' . "\n"; |
| 352 | 352 | list($depapp,$depver) = parsedep($setup_info[$resolve]['depends'],False); |
| 353 | - $depapp_count = count($depapp); |
|
| 353 | + $depapp_count = count($depapp); |
|
| 354 | 354 | for ($i=0; $i<$depapp_count; $i++) |
| 355 | 355 | { |
| 356 | 356 | echo '<br />' . $depapp[$i] . ': '; |
@@ -285,7 +285,10 @@ |
||
| 285 | 285 | $val = array2string($val); |
| 286 | 286 | break; |
| 287 | 287 | default: |
| 288 | - if (is_array($val)) $val = implode(', ', $val); |
|
| 288 | + if (is_array($val)) |
|
| 289 | + { |
|
| 290 | + $val = implode(', ', $val); |
|
| 291 | + } |
|
| 289 | 292 | break; |
| 290 | 293 | } |
| 291 | 294 | $setup_tpl->set_var('bg_color', $bgcolor[++$i & 1]); |
@@ -51,36 +51,36 @@ discard block |
||
| 51 | 51 | Api\Csrf::validate($_POST['csrf_token'], __FILE__); |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | -$setup_tpl->set_block('T_login_stage_header','B_multi_domain','V_multi_domain'); |
|
| 55 | -$setup_tpl->set_block('T_login_stage_header','B_single_domain','V_single_domain'); |
|
| 56 | -$setup_tpl->set_block('T_setup_main','header','header'); |
|
| 57 | -$setup_tpl->set_block('T_setup_main','app_header','app_header'); |
|
| 58 | -$setup_tpl->set_block('T_setup_main','apps','apps'); |
|
| 59 | -$setup_tpl->set_block('T_setup_main','detail','detail'); |
|
| 60 | -$setup_tpl->set_block('T_setup_main','table','table'); |
|
| 61 | -$setup_tpl->set_block('T_setup_main','hook','hook'); |
|
| 62 | -$setup_tpl->set_block('T_setup_main','dep','dep'); |
|
| 63 | -$setup_tpl->set_block('T_setup_main','app_footer','app_footer'); |
|
| 64 | -$setup_tpl->set_block('T_setup_main','submit','submit'); |
|
| 65 | -$setup_tpl->set_block('T_setup_main','footer','footer'); |
|
| 66 | - |
|
| 67 | -$bgcolor = array('#DDDDDD','#EEEEEE'); |
|
| 68 | - |
|
| 69 | -function parsedep($depends,$main=True) |
|
| 54 | +$setup_tpl->set_block('T_login_stage_header', 'B_multi_domain', 'V_multi_domain'); |
|
| 55 | +$setup_tpl->set_block('T_login_stage_header', 'B_single_domain', 'V_single_domain'); |
|
| 56 | +$setup_tpl->set_block('T_setup_main', 'header', 'header'); |
|
| 57 | +$setup_tpl->set_block('T_setup_main', 'app_header', 'app_header'); |
|
| 58 | +$setup_tpl->set_block('T_setup_main', 'apps', 'apps'); |
|
| 59 | +$setup_tpl->set_block('T_setup_main', 'detail', 'detail'); |
|
| 60 | +$setup_tpl->set_block('T_setup_main', 'table', 'table'); |
|
| 61 | +$setup_tpl->set_block('T_setup_main', 'hook', 'hook'); |
|
| 62 | +$setup_tpl->set_block('T_setup_main', 'dep', 'dep'); |
|
| 63 | +$setup_tpl->set_block('T_setup_main', 'app_footer', 'app_footer'); |
|
| 64 | +$setup_tpl->set_block('T_setup_main', 'submit', 'submit'); |
|
| 65 | +$setup_tpl->set_block('T_setup_main', 'footer', 'footer'); |
|
| 66 | + |
|
| 67 | +$bgcolor = array('#DDDDDD', '#EEEEEE'); |
|
| 68 | + |
|
| 69 | +function parsedep($depends, $main = True) |
|
| 70 | 70 | { |
| 71 | 71 | $depstring = '('; |
| 72 | - foreach($depends as $b) |
|
| 72 | + foreach ($depends as $b) |
|
| 73 | 73 | { |
| 74 | - foreach($b as $c => $d) |
|
| 74 | + foreach ($b as $c => $d) |
|
| 75 | 75 | { |
| 76 | 76 | if (is_array($d)) |
| 77 | 77 | { |
| 78 | - $depstring .= $c . ': ' .implode(',',$d) . '; '; |
|
| 78 | + $depstring .= $c.': '.implode(',', $d).'; '; |
|
| 79 | 79 | $depver[] = $d; |
| 80 | 80 | } |
| 81 | 81 | else |
| 82 | 82 | { |
| 83 | - $depstring .= $c . ': ' . $d . '; '; |
|
| 83 | + $depstring .= $c.': '.$d.'; '; |
|
| 84 | 84 | $depapp[] = $d; |
| 85 | 85 | } |
| 86 | 86 | } |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | } |
| 93 | 93 | else |
| 94 | 94 | { |
| 95 | - return array($depapp,$depver); |
|
| 95 | + return array($depapp, $depver); |
|
| 96 | 96 | } |
| 97 | 97 | } |
| 98 | 98 | |
@@ -106,17 +106,17 @@ discard block |
||
| 106 | 106 | |
| 107 | 107 | @ksort($setup_info); |
| 108 | 108 | |
| 109 | -if(@$_POST['cancel']) |
|
| 109 | +if (@$_POST['cancel']) |
|
| 110 | 110 | { |
| 111 | 111 | Header("Location: index.php"); |
| 112 | 112 | exit; |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | -if(@$_POST['submit']) |
|
| 115 | +if (@$_POST['submit']) |
|
| 116 | 116 | { |
| 117 | - $GLOBALS['egw_setup']->html->show_header(lang('Application Management'),False,'config',$GLOBALS['egw_setup']->ConfigDomain . '(' . $GLOBALS['egw_domain'][$GLOBALS['egw_setup']->ConfigDomain]['db_type'] . ')'); |
|
| 118 | - $setup_tpl->set_var('description',lang('App install/remove/upgrade') . ':'); |
|
| 119 | - $setup_tpl->pparse('out','header'); |
|
| 117 | + $GLOBALS['egw_setup']->html->show_header(lang('Application Management'), False, 'config', $GLOBALS['egw_setup']->ConfigDomain.'('.$GLOBALS['egw_domain'][$GLOBALS['egw_setup']->ConfigDomain]['db_type'].')'); |
|
| 118 | + $setup_tpl->set_var('description', lang('App install/remove/upgrade').':'); |
|
| 119 | + $setup_tpl->pparse('out', 'header'); |
|
| 120 | 120 | |
| 121 | 121 | $appname = $_POST['appname']; |
| 122 | 122 | $remove = $_POST['remove']; |
@@ -125,14 +125,14 @@ discard block |
||
| 125 | 125 | |
| 126 | 126 | $register_hooks = false; |
| 127 | 127 | |
| 128 | - if(!empty($remove) && is_array($remove)) |
|
| 128 | + if (!empty($remove) && is_array($remove)) |
|
| 129 | 129 | { |
| 130 | 130 | $register_hooks = $GLOBALS['egw_setup']->process->remove(array_keys($remove), $setup_info, $DEBUG) > 0; |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | - if(!empty($install) && is_array($install)) |
|
| 133 | + if (!empty($install) && is_array($install)) |
|
| 134 | 134 | { |
| 135 | - foreach($install as $appname => $key) |
|
| 135 | + foreach ($install as $appname => $key) |
|
| 136 | 136 | { |
| 137 | 137 | $app_title = $setup_info[$appname]['title'] ? $setup_info[$appname]['title'] : $setup_info[$appname]['name']; |
| 138 | 138 | $terror = array(); |
@@ -142,13 +142,13 @@ discard block |
||
| 142 | 142 | { |
| 143 | 143 | $terror_c = $GLOBALS['egw_setup']->process->current($terror, $DEBUG); |
| 144 | 144 | $terror = $GLOBALS['egw_setup']->process->default_records($terror_c, $DEBUG); |
| 145 | - echo '<br />' . $app_title . ' ' |
|
| 146 | - . lang('tables installed, unless there are errors printed above') . '.'; |
|
| 145 | + echo '<br />'.$app_title.' ' |
|
| 146 | + . lang('tables installed, unless there are errors printed above').'.'; |
|
| 147 | 147 | } |
| 148 | 148 | else |
| 149 | 149 | { |
| 150 | 150 | // check default_records for apps without tables, they might need some initial work too |
| 151 | - $terror = $GLOBALS['egw_setup']->process->default_records($terror,$DEBUG); |
|
| 151 | + $terror = $GLOBALS['egw_setup']->process->default_records($terror, $DEBUG); |
|
| 152 | 152 | if ($GLOBALS['egw_setup']->app_registered($setup_info[$appname]['name'])) |
| 153 | 153 | { |
| 154 | 154 | $GLOBALS['egw_setup']->update_app($setup_info[$appname]['name']); |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | { |
| 158 | 158 | $GLOBALS['egw_setup']->register_app($setup_info[$appname]['name']); |
| 159 | 159 | } |
| 160 | - echo '<br />' . $app_title . ' ' . lang('registered') . '.'; |
|
| 160 | + echo '<br />'.$app_title.' '.lang('registered').'.'; |
|
| 161 | 161 | |
| 162 | 162 | if ($setup_info[$appname]['hooks']) |
| 163 | 163 | { |
@@ -167,23 +167,23 @@ discard block |
||
| 167 | 167 | } |
| 168 | 168 | } |
| 169 | 169 | |
| 170 | - if(!empty($upgrade) && is_array($upgrade)) |
|
| 170 | + if (!empty($upgrade) && is_array($upgrade)) |
|
| 171 | 171 | { |
| 172 | - foreach($upgrade as $appname => $key) |
|
| 172 | + foreach ($upgrade as $appname => $key) |
|
| 173 | 173 | { |
| 174 | 174 | $app_title = $setup_info[$appname]['title'] ? $setup_info[$appname]['title'] : $setup_info[$appname]['name']; |
| 175 | 175 | $terror = array(); |
| 176 | 176 | $terror[$appname] = $setup_info[$appname]; |
| 177 | 177 | |
| 178 | - $GLOBALS['egw_setup']->process->upgrade($terror,$DEBUG); |
|
| 178 | + $GLOBALS['egw_setup']->process->upgrade($terror, $DEBUG); |
|
| 179 | 179 | if ($setup_info[$appname]['tables']) |
| 180 | 180 | { |
| 181 | - echo '<br />' . $app_title . ' ' . lang('tables upgraded') . '.'; |
|
| 181 | + echo '<br />'.$app_title.' '.lang('tables upgraded').'.'; |
|
| 182 | 182 | // The process_upgrade() function also handles registration |
| 183 | 183 | } |
| 184 | 184 | else |
| 185 | 185 | { |
| 186 | - echo '<br />' . $app_title . ' ' . lang('upgraded') . '.'; |
|
| 186 | + echo '<br />'.$app_title.' '.lang('upgraded').'.'; |
|
| 187 | 187 | } |
| 188 | 188 | $register_hooks = true; |
| 189 | 189 | } |
@@ -192,61 +192,61 @@ discard block |
||
| 192 | 192 | if ($register_hooks) |
| 193 | 193 | { |
| 194 | 194 | Api\Hooks::read(true); |
| 195 | - echo '<br />' . $app_title . ' ' . lang('hooks registered') . '.'; |
|
| 195 | + echo '<br />'.$app_title.' '.lang('hooks registered').'.'; |
|
| 196 | 196 | } |
| 197 | 197 | |
| 198 | 198 | //$setup_tpl->set_var('goback', |
| 199 | - echo '<br /><a href="applications.php?debug='.$DEBUG.'">' . lang('Go back') . '</a>'; |
|
| 199 | + echo '<br /><a href="applications.php?debug='.$DEBUG.'">'.lang('Go back').'</a>'; |
|
| 200 | 200 | //$setup_tpl->pparse('out','submit'); |
| 201 | - $setup_tpl->pparse('out','footer'); |
|
| 201 | + $setup_tpl->pparse('out', 'footer'); |
|
| 202 | 202 | exit; |
| 203 | 203 | } |
| 204 | 204 | else |
| 205 | 205 | { |
| 206 | - $GLOBALS['egw_setup']->html->show_header(lang('Application Management'),False,'config',$GLOBALS['egw_setup']->ConfigDomain . '(' . $GLOBALS['egw_domain'][$GLOBALS['egw_setup']->ConfigDomain]['db_type'] . ')'); |
|
| 206 | + $GLOBALS['egw_setup']->html->show_header(lang('Application Management'), False, 'config', $GLOBALS['egw_setup']->ConfigDomain.'('.$GLOBALS['egw_domain'][$GLOBALS['egw_setup']->ConfigDomain]['db_type'].')'); |
|
| 207 | 207 | } |
| 208 | 208 | |
| 209 | -if(@$_GET['hooks']) |
|
| 209 | +if (@$_GET['hooks']) |
|
| 210 | 210 | { |
| 211 | 211 | Api\Cache::flush(Api\Cache::INSTANCE); |
| 212 | 212 | |
| 213 | - echo lang('Cached cleared') . '<br />'; |
|
| 213 | + echo lang('Cached cleared').'<br />'; |
|
| 214 | 214 | } |
| 215 | 215 | $detail = $_GET['detail']; |
| 216 | 216 | $resolve = $_GET['resolve']; |
| 217 | -if(@$detail) |
|
| 217 | +if (@$detail) |
|
| 218 | 218 | { |
| 219 | 219 | @ksort($setup_info[$detail]); |
| 220 | - $setup_tpl->set_var('description',lang('App details') . ':'); |
|
| 221 | - $setup_tpl->pparse('out','header'); |
|
| 220 | + $setup_tpl->set_var('description', lang('App details').':'); |
|
| 221 | + $setup_tpl->pparse('out', 'header'); |
|
| 222 | 222 | |
| 223 | - $setup_tpl->set_var('name','application'); |
|
| 223 | + $setup_tpl->set_var('name', 'application'); |
|
| 224 | 224 | $setup_tpl->set_var('details', lang($setup_info[$detail]['title'])); |
| 225 | - $setup_tpl->pparse('out','detail'); |
|
| 225 | + $setup_tpl->pparse('out', 'detail'); |
|
| 226 | 226 | |
| 227 | - foreach($setup_info[$detail] as $key => $val) |
|
| 227 | + foreach ($setup_info[$detail] as $key => $val) |
|
| 228 | 228 | { |
| 229 | - switch($key) |
|
| 229 | + switch ($key) |
|
| 230 | 230 | { |
| 231 | 231 | case 'title': |
| 232 | 232 | continue 2; |
| 233 | 233 | case 'tables': |
| 234 | 234 | $tblcnt = count($setup_info[$detail][$key]); |
| 235 | - if(is_array($val)) |
|
| 235 | + if (is_array($val)) |
|
| 236 | 236 | { |
| 237 | - $key = '<a href="sqltoarray.php?appname=' . $detail . '&submit=True&apps=True">' . $key . '(' . $tblcnt . ')</a>' . "\n"; |
|
| 238 | - $val = implode(',' . "\n",$val); |
|
| 237 | + $key = '<a href="sqltoarray.php?appname='.$detail.'&submit=True&apps=True">'.$key.'('.$tblcnt.')</a>'."\n"; |
|
| 238 | + $val = implode(','."\n", $val); |
|
| 239 | 239 | } |
| 240 | 240 | break; |
| 241 | 241 | case 'hooks': |
| 242 | - foreach($val as &$hooks) |
|
| 242 | + foreach ($val as &$hooks) |
|
| 243 | 243 | { |
| 244 | 244 | $hooks = (array)$hooks; |
| 245 | 245 | } |
| 246 | 246 | $val = str_replace('EGroupware\\', '', implode(', ', call_user_func_array('array_merge', $val))); |
| 247 | 247 | break; |
| 248 | 248 | case 'depends': |
| 249 | - foreach($val as &$dep) |
|
| 249 | + foreach ($val as &$dep) |
|
| 250 | 250 | { |
| 251 | 251 | $dep = $dep['appname'].': '.implode(', ', $dep['versions']); |
| 252 | 252 | } |
@@ -259,174 +259,174 @@ discard block |
||
| 259 | 259 | if (is_array($val)) $val = implode(', ', $val); |
| 260 | 260 | break; |
| 261 | 261 | } |
| 262 | - $setup_tpl->set_var('bg_color', $bgcolor[++$i & 1]); |
|
| 263 | - $setup_tpl->set_var('name',$key); |
|
| 264 | - $setup_tpl->set_var('details',$val); |
|
| 265 | - $setup_tpl->pparse('out','detail'); |
|
| 262 | + $setup_tpl->set_var('bg_color', $bgcolor[++$i&1]); |
|
| 263 | + $setup_tpl->set_var('name', $key); |
|
| 264 | + $setup_tpl->set_var('details', $val); |
|
| 265 | + $setup_tpl->pparse('out', 'detail'); |
|
| 266 | 266 | } |
| 267 | 267 | |
| 268 | - echo '<br /><a href="applications.php?debug='.$DEBUG.'">' . lang('Go back') . '</a>'; |
|
| 269 | - $setup_tpl->pparse('out','footer'); |
|
| 268 | + echo '<br /><a href="applications.php?debug='.$DEBUG.'">'.lang('Go back').'</a>'; |
|
| 269 | + $setup_tpl->pparse('out', 'footer'); |
|
| 270 | 270 | exit; |
| 271 | 271 | } |
| 272 | 272 | elseif (@$resolve) |
| 273 | 273 | { |
| 274 | 274 | $version = $_GET['version']; |
| 275 | 275 | $notables = $_GET['notables']; |
| 276 | - $setup_tpl->set_var('description',lang('Problem resolution'). ':'); |
|
| 277 | - $setup_tpl->pparse('out','header'); |
|
| 276 | + $setup_tpl->set_var('description', lang('Problem resolution').':'); |
|
| 277 | + $setup_tpl->pparse('out', 'header'); |
|
| 278 | 278 | $app_title = $setup_info[$resolve]['title'] ? $setup_info[$resolve]['title'] : $setup_info[$resolve]['name']; |
| 279 | 279 | |
| 280 | - if($_GET['post']) |
|
| 280 | + if ($_GET['post']) |
|
| 281 | 281 | { |
| 282 | - echo '"' . $app_title . '" ' . lang('may be broken') . ' '; |
|
| 282 | + echo '"'.$app_title.'" '.lang('may be broken').' '; |
|
| 283 | 283 | echo lang('because an application it depends upon was upgraded'); |
| 284 | 284 | echo '<br />'; |
| 285 | - echo lang('to a version it does not know about') . '.'; |
|
| 285 | + echo lang('to a version it does not know about').'.'; |
|
| 286 | 286 | echo '<br />'; |
| 287 | - echo lang('However, the application may still work') . '.'; |
|
| 287 | + echo lang('However, the application may still work').'.'; |
|
| 288 | 288 | } |
| 289 | - elseif($_GET['badinstall']) |
|
| 289 | + elseif ($_GET['badinstall']) |
|
| 290 | 290 | { |
| 291 | - echo '"' . $app_title . '" ' . lang('is broken') . ' '; |
|
| 292 | - echo lang('because of a failed upgrade or install') . '.'; |
|
| 291 | + echo '"'.$app_title.'" '.lang('is broken').' '; |
|
| 292 | + echo lang('because of a failed upgrade or install').'.'; |
|
| 293 | 293 | echo '<br />'; |
| 294 | - echo lang('Some or all of its tables are missing') . '.'; |
|
| 294 | + echo lang('Some or all of its tables are missing').'.'; |
|
| 295 | 295 | echo '<br />'; |
| 296 | - echo lang('You should either uninstall and then reinstall it, or attempt manual repairs') . '.'; |
|
| 296 | + echo lang('You should either uninstall and then reinstall it, or attempt manual repairs').'.'; |
|
| 297 | 297 | } |
| 298 | - elseif($_GET['deleted']) |
|
| 298 | + elseif ($_GET['deleted']) |
|
| 299 | 299 | { |
| 300 | - echo '"' . $app_title . '" ' . lang('is broken') . ' '; |
|
| 301 | - echo lang('because its sources are missing') . '!'; |
|
| 300 | + echo '"'.$app_title.'" '.lang('is broken').' '; |
|
| 301 | + echo lang('because its sources are missing').'!'; |
|
| 302 | 302 | echo '<br />'; |
| 303 | - echo lang('However the tables are still in the database') . '.'; |
|
| 303 | + echo lang('However the tables are still in the database').'.'; |
|
| 304 | 304 | echo '<br />'; |
| 305 | - echo lang('You should either install the sources or uninstall it, to get rid of the tables') . '.'; |
|
| 305 | + echo lang('You should either install the sources or uninstall it, to get rid of the tables').'.'; |
|
| 306 | 306 | } |
| 307 | 307 | elseif (!$version) |
| 308 | 308 | { |
| 309 | - if($setup_info[$resolve]['enabled']) |
|
| 309 | + if ($setup_info[$resolve]['enabled']) |
|
| 310 | 310 | { |
| 311 | - echo '"' . $app_title . '" ' . lang('is broken') . ' '; |
|
| 311 | + echo '"'.$app_title.'" '.lang('is broken').' '; |
|
| 312 | 312 | } |
| 313 | 313 | else |
| 314 | 314 | { |
| 315 | - echo '"' . $app_title . '" ' . lang('is disabled') . ' '; |
|
| 315 | + echo '"'.$app_title.'" '.lang('is disabled').' '; |
|
| 316 | 316 | } |
| 317 | 317 | |
| 318 | 318 | if (!$notables) |
| 319 | 319 | { |
| 320 | - if($setup_info[$resolve]['status'] == 'D') |
|
| 320 | + if ($setup_info[$resolve]['status'] == 'D') |
|
| 321 | 321 | { |
| 322 | - echo lang('because it depends upon') . ':<br />' . "\n"; |
|
| 323 | - list($depapp,$depver) = parsedep($setup_info[$resolve]['depends'],False); |
|
| 322 | + echo lang('because it depends upon').':<br />'."\n"; |
|
| 323 | + list($depapp, $depver) = parsedep($setup_info[$resolve]['depends'], False); |
|
| 324 | 324 | $depapp_count = count($depapp); |
| 325 | - for ($i=0; $i<$depapp_count; $i++) |
|
| 325 | + for ($i = 0; $i < $depapp_count; $i++) |
|
| 326 | 326 | { |
| 327 | - echo '<br />' . $depapp[$i] . ': '; |
|
| 327 | + echo '<br />'.$depapp[$i].': '; |
|
| 328 | 328 | $list = ''; |
| 329 | - foreach($depver[$i] as $x => $y) |
|
| 329 | + foreach ($depver[$i] as $x => $y) |
|
| 330 | 330 | { |
| 331 | - $list .= $y . ', '; |
|
| 331 | + $list .= $y.', '; |
|
| 332 | 332 | } |
| 333 | - echo substr($list,0,-2)."\n"; |
|
| 333 | + echo substr($list, 0, -2)."\n"; |
|
| 334 | 334 | } |
| 335 | - echo '<br /><br />' . lang('The table definition was correct, and the tables were installed') . '.'; |
|
| 335 | + echo '<br /><br />'.lang('The table definition was correct, and the tables were installed').'.'; |
|
| 336 | 336 | } |
| 337 | 337 | else |
| 338 | 338 | { |
| 339 | - echo lang('because it was manually disabled') . '.'; |
|
| 339 | + echo lang('because it was manually disabled').'.'; |
|
| 340 | 340 | } |
| 341 | 341 | } |
| 342 | - elseif($setup_info[$resolve]['enable'] == 2) |
|
| 342 | + elseif ($setup_info[$resolve]['enable'] == 2) |
|
| 343 | 343 | { |
| 344 | - echo lang('because it is not a user application, or access is controlled via acl') . '.'; |
|
| 344 | + echo lang('because it is not a user application, or access is controlled via acl').'.'; |
|
| 345 | 345 | } |
| 346 | - elseif($setup_info[$resolve]['enable'] == 0) |
|
| 346 | + elseif ($setup_info[$resolve]['enable'] == 0) |
|
| 347 | 347 | { |
| 348 | - echo lang('because the enable flag for this app is set to 0, or is undefined') . '.'; |
|
| 348 | + echo lang('because the enable flag for this app is set to 0, or is undefined').'.'; |
|
| 349 | 349 | } |
| 350 | 350 | else |
| 351 | 351 | { |
| 352 | - echo lang('because it requires manual table installation, <br />or the table definition was incorrect') . ".\n" |
|
| 353 | - . lang("Please check for sql scripts within the application's directory") . '.'; |
|
| 352 | + echo lang('because it requires manual table installation, <br />or the table definition was incorrect').".\n" |
|
| 353 | + . lang("Please check for sql scripts within the application's directory").'.'; |
|
| 354 | 354 | } |
| 355 | - echo '<br />' . lang('However, the application is otherwise installed') . '.'; |
|
| 355 | + echo '<br />'.lang('However, the application is otherwise installed').'.'; |
|
| 356 | 356 | } |
| 357 | 357 | else |
| 358 | 358 | { |
| 359 | - echo $app_title . ' ' . lang('has a version mismatch') . ' '; |
|
| 360 | - echo lang('because of a failed upgrade, or the database is newer than the installed version of this app') . '.'; |
|
| 359 | + echo $app_title.' '.lang('has a version mismatch').' '; |
|
| 360 | + echo lang('because of a failed upgrade, or the database is newer than the installed version of this app').'.'; |
|
| 361 | 361 | echo '<br />'; |
| 362 | - echo lang('If the application has no defined tables, selecting upgrade should remedy the problem') . '.'; |
|
| 363 | - echo '<br />' . lang('However, the application is otherwise installed') . '.'; |
|
| 362 | + echo lang('If the application has no defined tables, selecting upgrade should remedy the problem').'.'; |
|
| 363 | + echo '<br />'.lang('However, the application is otherwise installed').'.'; |
|
| 364 | 364 | } |
| 365 | 365 | |
| 366 | - echo '<br /><a href="applications.php?debug='.$DEBUG.'">' . lang('Go back') . '</a>'; |
|
| 367 | - $setup_tpl->pparse('out','footer'); |
|
| 366 | + echo '<br /><a href="applications.php?debug='.$DEBUG.'">'.lang('Go back').'</a>'; |
|
| 367 | + $setup_tpl->pparse('out', 'footer'); |
|
| 368 | 368 | exit; |
| 369 | 369 | } |
| 370 | 370 | else |
| 371 | 371 | { |
| 372 | - $setup_tpl->set_var('description',lang('Select the desired action(s) from the available choices')); |
|
| 373 | - $setup_tpl->set_var('action_url','applications.php'); |
|
| 374 | - $setup_tpl->pparse('out','header'); |
|
| 375 | - |
|
| 376 | - $setup_tpl->set_var('appdata',lang('Application Data')); |
|
| 377 | - $setup_tpl->set_var('actions',lang('Actions')); |
|
| 378 | - $setup_tpl->set_var('app_info',lang('Application Name and Status Information')); |
|
| 379 | - $setup_tpl->set_var('app_title',lang('Application Title')); |
|
| 380 | - $setup_tpl->set_var('app_currentver',lang('Current Version')); |
|
| 381 | - $setup_tpl->set_var('app_version',lang('Available Version')); |
|
| 382 | - $setup_tpl->set_var('app_install',lang('Install')); |
|
| 383 | - $setup_tpl->set_var('app_remove',lang('Remove')); |
|
| 384 | - $setup_tpl->set_var('app_upgrade',lang('Upgrade')); |
|
| 385 | - $setup_tpl->set_var('app_resolve',lang('Resolve')); |
|
| 386 | - $setup_tpl->set_var('check','check.png'); |
|
| 387 | - $setup_tpl->set_var('install_all',lang('Install All')); |
|
| 388 | - $setup_tpl->set_var('upgrade_all',lang('Upgrade All')); |
|
| 389 | - $setup_tpl->set_var('remove_all',lang('Remove All')); |
|
| 390 | - $setup_tpl->set_var('lang_debug',lang('enable for extra debug-messages')); |
|
| 391 | - $setup_tpl->set_var('debug','<input type="checkbox" name="debug" value="True"' .($DEBUG ? ' checked="checked"' : '') . ' />'); |
|
| 392 | - $setup_tpl->set_var('bg_color',$bgcolor[0]); |
|
| 393 | - |
|
| 394 | - $setup_tpl->pparse('out','app_header'); |
|
| 372 | + $setup_tpl->set_var('description', lang('Select the desired action(s) from the available choices')); |
|
| 373 | + $setup_tpl->set_var('action_url', 'applications.php'); |
|
| 374 | + $setup_tpl->pparse('out', 'header'); |
|
| 375 | + |
|
| 376 | + $setup_tpl->set_var('appdata', lang('Application Data')); |
|
| 377 | + $setup_tpl->set_var('actions', lang('Actions')); |
|
| 378 | + $setup_tpl->set_var('app_info', lang('Application Name and Status Information')); |
|
| 379 | + $setup_tpl->set_var('app_title', lang('Application Title')); |
|
| 380 | + $setup_tpl->set_var('app_currentver', lang('Current Version')); |
|
| 381 | + $setup_tpl->set_var('app_version', lang('Available Version')); |
|
| 382 | + $setup_tpl->set_var('app_install', lang('Install')); |
|
| 383 | + $setup_tpl->set_var('app_remove', lang('Remove')); |
|
| 384 | + $setup_tpl->set_var('app_upgrade', lang('Upgrade')); |
|
| 385 | + $setup_tpl->set_var('app_resolve', lang('Resolve')); |
|
| 386 | + $setup_tpl->set_var('check', 'check.png'); |
|
| 387 | + $setup_tpl->set_var('install_all', lang('Install All')); |
|
| 388 | + $setup_tpl->set_var('upgrade_all', lang('Upgrade All')); |
|
| 389 | + $setup_tpl->set_var('remove_all', lang('Remove All')); |
|
| 390 | + $setup_tpl->set_var('lang_debug', lang('enable for extra debug-messages')); |
|
| 391 | + $setup_tpl->set_var('debug', '<input type="checkbox" name="debug" value="True"'.($DEBUG ? ' checked="checked"' : '').' />'); |
|
| 392 | + $setup_tpl->set_var('bg_color', $bgcolor[0]); |
|
| 393 | + |
|
| 394 | + $setup_tpl->pparse('out', 'app_header'); |
|
| 395 | 395 | |
| 396 | 396 | $i = 0; |
| 397 | - foreach($setup_info as $key => $value) |
|
| 397 | + foreach ($setup_info as $key => $value) |
|
| 398 | 398 | { |
| 399 | - if(@$value['name']) |
|
| 399 | + if (@$value['name']) |
|
| 400 | 400 | { |
| 401 | 401 | $i = ($i ? 0 : 1); |
| 402 | - $setup_tpl->set_var('apptitle',$value['title']?$value['title']:lang($value['name'])); |
|
| 403 | - $setup_tpl->set_var('currentver',@$value['currentver']); |
|
| 404 | - $setup_tpl->set_var('version',$value['version']); |
|
| 405 | - $setup_tpl->set_var('bg_color',$bgcolor[$i]); |
|
| 402 | + $setup_tpl->set_var('apptitle', $value['title'] ? $value['title'] : lang($value['name'])); |
|
| 403 | + $setup_tpl->set_var('currentver', @$value['currentver']); |
|
| 404 | + $setup_tpl->set_var('version', $value['version']); |
|
| 405 | + $setup_tpl->set_var('bg_color', $bgcolor[$i]); |
|
| 406 | 406 | |
| 407 | - switch($value['status']) |
|
| 407 | + switch ($value['status']) |
|
| 408 | 408 | { |
| 409 | 409 | case 'C': |
| 410 | - $setup_tpl->set_var('remove', $key == 'api' ? ' ' : '<input type="checkbox" name="remove[' . $value['name'] . ']" />'); |
|
| 411 | - $setup_tpl->set_var('upgrade',' '); |
|
| 410 | + $setup_tpl->set_var('remove', $key == 'api' ? ' ' : '<input type="checkbox" name="remove['.$value['name'].']" />'); |
|
| 411 | + $setup_tpl->set_var('upgrade', ' '); |
|
| 412 | 412 | if (!$GLOBALS['egw_setup']->detection->check_app_tables($value['name'])) |
| 413 | 413 | { |
| 414 | 414 | // App installed and enabled, but some tables are missing |
| 415 | - $setup_tpl->set_var('instimg','table.png'); |
|
| 416 | - $setup_tpl->set_var('bg_color','FFCCAA'); |
|
| 417 | - $setup_tpl->set_var('instalt',lang('Not Completed')); |
|
| 418 | - $setup_tpl->set_var('resolution','<a href="applications.php?resolve=' . $value['name'] . '&badinstall=True">' . lang('Potential Problem') . '</a>'); |
|
| 419 | - $status = lang('Requires reinstall or manual repair') . ' - ' . $value['status']; |
|
| 415 | + $setup_tpl->set_var('instimg', 'table.png'); |
|
| 416 | + $setup_tpl->set_var('bg_color', 'FFCCAA'); |
|
| 417 | + $setup_tpl->set_var('instalt', lang('Not Completed')); |
|
| 418 | + $setup_tpl->set_var('resolution', '<a href="applications.php?resolve='.$value['name'].'&badinstall=True">'.lang('Potential Problem').'</a>'); |
|
| 419 | + $status = lang('Requires reinstall or manual repair').' - '.$value['status']; |
|
| 420 | 420 | } |
| 421 | 421 | else |
| 422 | 422 | { |
| 423 | - $setup_tpl->set_var('instimg','completed.png'); |
|
| 424 | - $setup_tpl->set_var('instalt',lang('Completed')); |
|
| 425 | - $setup_tpl->set_var('install',' '); |
|
| 426 | - if($value['enabled']) |
|
| 423 | + $setup_tpl->set_var('instimg', 'completed.png'); |
|
| 424 | + $setup_tpl->set_var('instalt', lang('Completed')); |
|
| 425 | + $setup_tpl->set_var('install', ' '); |
|
| 426 | + if ($value['enabled']) |
|
| 427 | 427 | { |
| 428 | - $setup_tpl->set_var('resolution',''); |
|
| 429 | - $status = lang('OK') . ' - ' . $value['status']; |
|
| 428 | + $setup_tpl->set_var('resolution', ''); |
|
| 429 | + $status = lang('OK').' - '.$value['status']; |
|
| 430 | 430 | } |
| 431 | 431 | else |
| 432 | 432 | { |
@@ -434,123 +434,123 @@ discard block |
||
| 434 | 434 | { |
| 435 | 435 | $notables = '¬ables=True'; |
| 436 | 436 | } |
| 437 | - $setup_tpl->set_var('bg_color','CCCCFF'); |
|
| 437 | + $setup_tpl->set_var('bg_color', 'CCCCFF'); |
|
| 438 | 438 | $setup_tpl->set_var('resolution', |
| 439 | - '<a href="applications.php?resolve=' . $value['name'] . $notables . '">' . lang('Possible Reasons') . '</a>' |
|
| 439 | + '<a href="applications.php?resolve='.$value['name'].$notables.'">'.lang('Possible Reasons').'</a>' |
|
| 440 | 440 | ); |
| 441 | - $status = lang('Disabled') . ' - ' . $value['status']; |
|
| 441 | + $status = lang('Disabled').' - '.$value['status']; |
|
| 442 | 442 | } |
| 443 | 443 | } |
| 444 | 444 | break; |
| 445 | 445 | case 'U': |
| 446 | - $setup_tpl->set_var('instimg','incomplete.png'); |
|
| 447 | - $setup_tpl->set_var('instalt',lang('Not Completed')); |
|
| 446 | + $setup_tpl->set_var('instimg', 'incomplete.png'); |
|
| 447 | + $setup_tpl->set_var('instalt', lang('Not Completed')); |
|
| 448 | 448 | if (!@$value['currentver']) |
| 449 | 449 | { |
| 450 | - if ($value['tables'] && $GLOBALS['egw_setup']->detection->check_app_tables($value['name'],True)) |
|
| 450 | + if ($value['tables'] && $GLOBALS['egw_setup']->detection->check_app_tables($value['name'], True)) |
|
| 451 | 451 | { |
| 452 | 452 | // Some tables missing |
| 453 | - $setup_tpl->set_var('remove',$key == 'api' ? ' ' : '<input type="checkbox" name="remove[' . $value['name'] . ']" />'); |
|
| 454 | - $setup_tpl->set_var('resolution','<a href="applications.php?resolve=' . $value['name'] . '&badinstall=True">' . lang('Potential Problem') . '</a>'); |
|
| 455 | - $status = lang('Requires reinstall or manual repair') . ' - ' . $value['status']; |
|
| 453 | + $setup_tpl->set_var('remove', $key == 'api' ? ' ' : '<input type="checkbox" name="remove['.$value['name'].']" />'); |
|
| 454 | + $setup_tpl->set_var('resolution', '<a href="applications.php?resolve='.$value['name'].'&badinstall=True">'.lang('Potential Problem').'</a>'); |
|
| 455 | + $status = lang('Requires reinstall or manual repair').' - '.$value['status']; |
|
| 456 | 456 | } |
| 457 | 457 | else |
| 458 | 458 | { |
| 459 | - $setup_tpl->set_var('remove',' '); |
|
| 460 | - $setup_tpl->set_var('resolution',''); |
|
| 461 | - $status = lang('Requires upgrade') . ' - ' . $value['status']; |
|
| 459 | + $setup_tpl->set_var('remove', ' '); |
|
| 460 | + $setup_tpl->set_var('resolution', ''); |
|
| 461 | + $status = lang('Requires upgrade').' - '.$value['status']; |
|
| 462 | 462 | } |
| 463 | 463 | // show not installed apps without icon |
| 464 | - $setup_tpl->set_var('instimg','spacer.png'); |
|
| 465 | - $setup_tpl->set_var('instalt',''); |
|
| 466 | - $setup_tpl->set_var('bg_color','CCFFCC'); |
|
| 467 | - $setup_tpl->set_var('install','<input type="checkbox" name="install[' . $value['name'] . ']" />'); |
|
| 468 | - $setup_tpl->set_var('upgrade',' '); |
|
| 469 | - $status = lang('Please install') . ' - ' . $value['status']; |
|
| 464 | + $setup_tpl->set_var('instimg', 'spacer.png'); |
|
| 465 | + $setup_tpl->set_var('instalt', ''); |
|
| 466 | + $setup_tpl->set_var('bg_color', 'CCFFCC'); |
|
| 467 | + $setup_tpl->set_var('install', '<input type="checkbox" name="install['.$value['name'].']" />'); |
|
| 468 | + $setup_tpl->set_var('upgrade', ' '); |
|
| 469 | + $status = lang('Please install').' - '.$value['status']; |
|
| 470 | 470 | } |
| 471 | 471 | else |
| 472 | 472 | { |
| 473 | - $setup_tpl->set_var('bg_color','CCCCFF'); |
|
| 474 | - $setup_tpl->set_var('install',' '); |
|
| 473 | + $setup_tpl->set_var('bg_color', 'CCCCFF'); |
|
| 474 | + $setup_tpl->set_var('install', ' '); |
|
| 475 | 475 | // TODO display some info about breakage if you mess with this app |
| 476 | - $setup_tpl->set_var('upgrade','<input type="checkbox" name="upgrade[' . $value['name'] . ']" />'); |
|
| 477 | - $setup_tpl->set_var('remove',$key == 'api' ? ' ' : '<input type="checkbox" name="remove[' . $value['name'] . ']" />'); |
|
| 478 | - $setup_tpl->set_var('resolution',''); |
|
| 479 | - $status = lang('Requires upgrade') . ' - ' . $value['status']; |
|
| 476 | + $setup_tpl->set_var('upgrade', '<input type="checkbox" name="upgrade['.$value['name'].']" />'); |
|
| 477 | + $setup_tpl->set_var('remove', $key == 'api' ? ' ' : '<input type="checkbox" name="remove['.$value['name'].']" />'); |
|
| 478 | + $setup_tpl->set_var('resolution', ''); |
|
| 479 | + $status = lang('Requires upgrade').' - '.$value['status']; |
|
| 480 | 480 | } |
| 481 | 481 | break; |
| 482 | 482 | case 'V': |
| 483 | - $setup_tpl->set_var('instimg','incomplete.png'); |
|
| 484 | - $setup_tpl->set_var('instalt',lang('Not Completed')); |
|
| 485 | - $setup_tpl->set_var('install',' '); |
|
| 486 | - $setup_tpl->set_var('remove',$key == 'api' ? ' ' : '<input type="checkbox" name="remove[' . $value['name'] . ']" />'); |
|
| 483 | + $setup_tpl->set_var('instimg', 'incomplete.png'); |
|
| 484 | + $setup_tpl->set_var('instalt', lang('Not Completed')); |
|
| 485 | + $setup_tpl->set_var('install', ' '); |
|
| 486 | + $setup_tpl->set_var('remove', $key == 'api' ? ' ' : '<input type="checkbox" name="remove['.$value['name'].']" />'); |
|
| 487 | 487 | if ($value['version'] == 'deleted') |
| 488 | 488 | { |
| 489 | - $setup_tpl->set_var('bg_color','CCAAAA'); |
|
| 490 | - $setup_tpl->set_var('upgrade',' '); |
|
| 491 | - $setup_tpl->set_var('resolution','<a href="applications.php?resolve=' . $value['name'] . '&deleted=True">' . lang('Possible Solutions') . '</a>'); |
|
| 492 | - $status = lang('Sources deleted/missing') . ' - ' . $value['status']; |
|
| 489 | + $setup_tpl->set_var('bg_color', 'CCAAAA'); |
|
| 490 | + $setup_tpl->set_var('upgrade', ' '); |
|
| 491 | + $setup_tpl->set_var('resolution', '<a href="applications.php?resolve='.$value['name'].'&deleted=True">'.lang('Possible Solutions').'</a>'); |
|
| 492 | + $status = lang('Sources deleted/missing').' - '.$value['status']; |
|
| 493 | 493 | } |
| 494 | 494 | else |
| 495 | 495 | { |
| 496 | - $setup_tpl->set_var('upgrade','<input type="checkbox" name="upgrade[' . $value['name'] . ']" />'); |
|
| 497 | - $setup_tpl->set_var('resolution','<a href="applications.php?resolve=' . $value['name'] . '&version=True">' . lang('Possible Solutions') . '</a>'); |
|
| 498 | - $status = lang('Version Mismatch') . ' - ' . $value['status']; |
|
| 496 | + $setup_tpl->set_var('upgrade', '<input type="checkbox" name="upgrade['.$value['name'].']" />'); |
|
| 497 | + $setup_tpl->set_var('resolution', '<a href="applications.php?resolve='.$value['name'].'&version=True">'.lang('Possible Solutions').'</a>'); |
|
| 498 | + $status = lang('Version Mismatch').' - '.$value['status']; |
|
| 499 | 499 | } |
| 500 | 500 | break; |
| 501 | 501 | case 'D': |
| 502 | - $setup_tpl->set_var('bg_color','FFCCCC'); |
|
| 502 | + $setup_tpl->set_var('bg_color', 'FFCCCC'); |
|
| 503 | 503 | $depstring = parsedep($value['depends']); |
| 504 | 504 | $depstring .= ')'; |
| 505 | - $setup_tpl->set_var('instimg','dep.png'); |
|
| 506 | - $setup_tpl->set_var('instalt',lang('Dependency Failure')); |
|
| 507 | - $setup_tpl->set_var('install',' '); |
|
| 505 | + $setup_tpl->set_var('instimg', 'dep.png'); |
|
| 506 | + $setup_tpl->set_var('instalt', lang('Dependency Failure')); |
|
| 507 | + $setup_tpl->set_var('install', ' '); |
|
| 508 | 508 | if ($values['currentver']) |
| 509 | 509 | { |
| 510 | - $setup_tpl->set_var('remove',$key == 'api' ? ' ' : '<input type="checkbox" name="remove[' . $value['name'] . ']" />'); |
|
| 511 | - $setup_tpl->set_var('resolution','<a href="applications.php?resolve=' . $value['name'] . '">' . lang('Possible Solutions') . '</a>'); |
|
| 510 | + $setup_tpl->set_var('remove', $key == 'api' ? ' ' : '<input type="checkbox" name="remove['.$value['name'].']" />'); |
|
| 511 | + $setup_tpl->set_var('resolution', '<a href="applications.php?resolve='.$value['name'].'">'.lang('Possible Solutions').'</a>'); |
|
| 512 | 512 | } |
| 513 | 513 | else |
| 514 | 514 | { |
| 515 | - $setup_tpl->set_var('remove',' '); |
|
| 516 | - $setup_tpl->set_var('resolution',' '); |
|
| 515 | + $setup_tpl->set_var('remove', ' '); |
|
| 516 | + $setup_tpl->set_var('resolution', ' '); |
|
| 517 | 517 | } |
| 518 | - $setup_tpl->set_var('upgrade',' '); |
|
| 519 | - $status = lang('Dependency Failure') . ':' . $depstring . $value['status']; |
|
| 518 | + $setup_tpl->set_var('upgrade', ' '); |
|
| 519 | + $status = lang('Dependency Failure').':'.$depstring.$value['status']; |
|
| 520 | 520 | break; |
| 521 | 521 | case 'P': |
| 522 | - $setup_tpl->set_var('bg_color','FFCCFF'); |
|
| 522 | + $setup_tpl->set_var('bg_color', 'FFCCFF'); |
|
| 523 | 523 | $depstring = parsedep($value['depends']); |
| 524 | 524 | $depstring .= ')'; |
| 525 | - $setup_tpl->set_var('instimg','dep.png'); |
|
| 526 | - $setup_tpl->set_var('instalt',lang('Post-install Dependency Failure')); |
|
| 527 | - $setup_tpl->set_var('install',' '); |
|
| 528 | - $setup_tpl->set_var('remove',' '); |
|
| 529 | - $setup_tpl->set_var('upgrade',' '); |
|
| 530 | - $setup_tpl->set_var('resolution','<a href="applications.php?resolve=' . $value['name'] . '&post=True">' . lang('Possible Solutions') . '</a>'); |
|
| 531 | - $status = lang('Post-install Dependency Failure') . ':' . $depstring . $value['status']; |
|
| 525 | + $setup_tpl->set_var('instimg', 'dep.png'); |
|
| 526 | + $setup_tpl->set_var('instalt', lang('Post-install Dependency Failure')); |
|
| 527 | + $setup_tpl->set_var('install', ' '); |
|
| 528 | + $setup_tpl->set_var('remove', ' '); |
|
| 529 | + $setup_tpl->set_var('upgrade', ' '); |
|
| 530 | + $setup_tpl->set_var('resolution', '<a href="applications.php?resolve='.$value['name'].'&post=True">'.lang('Possible Solutions').'</a>'); |
|
| 531 | + $status = lang('Post-install Dependency Failure').':'.$depstring.$value['status']; |
|
| 532 | 532 | break; |
| 533 | 533 | default: |
| 534 | - $setup_tpl->set_var('instimg','incomplete.png'); |
|
| 535 | - $setup_tpl->set_var('instalt',lang('Not Completed')); |
|
| 536 | - $setup_tpl->set_var('install',' '); |
|
| 537 | - $setup_tpl->set_var('remove',' '); |
|
| 538 | - $setup_tpl->set_var('upgrade',' '); |
|
| 539 | - $setup_tpl->set_var('resolution',''); |
|
| 534 | + $setup_tpl->set_var('instimg', 'incomplete.png'); |
|
| 535 | + $setup_tpl->set_var('instalt', lang('Not Completed')); |
|
| 536 | + $setup_tpl->set_var('install', ' '); |
|
| 537 | + $setup_tpl->set_var('remove', ' '); |
|
| 538 | + $setup_tpl->set_var('upgrade', ' '); |
|
| 539 | + $setup_tpl->set_var('resolution', ''); |
|
| 540 | 540 | $status = ''; |
| 541 | 541 | break; |
| 542 | 542 | } |
| 543 | 543 | //$setup_tpl->set_var('appname',$value['name'] . '-' . $status . ',' . $value['filename']); |
| 544 | - $setup_tpl->set_var('appinfo',$value['name'] . '-' . $status); |
|
| 545 | - $setup_tpl->set_var('appname',$value['name']); |
|
| 544 | + $setup_tpl->set_var('appinfo', $value['name'].'-'.$status); |
|
| 545 | + $setup_tpl->set_var('appname', $value['name']); |
|
| 546 | 546 | |
| 547 | - $setup_tpl->pparse('out','apps',True); |
|
| 547 | + $setup_tpl->pparse('out', 'apps', True); |
|
| 548 | 548 | } |
| 549 | 549 | } |
| 550 | 550 | |
| 551 | - $setup_tpl->set_var('submit',lang('Save')); |
|
| 552 | - $setup_tpl->set_var('cancel',lang('Cancel')); |
|
| 553 | - $setup_tpl->pparse('out','app_footer'); |
|
| 554 | - $setup_tpl->pparse('out','footer'); |
|
| 551 | + $setup_tpl->set_var('submit', lang('Save')); |
|
| 552 | + $setup_tpl->set_var('cancel', lang('Cancel')); |
|
| 553 | + $setup_tpl->pparse('out', 'app_footer'); |
|
| 554 | + $setup_tpl->pparse('out', 'footer'); |
|
| 555 | 555 | $GLOBALS['egw_setup']->html->show_footer(); |
| 556 | 556 | } |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | * @version $Id$ |
| 12 | 12 | */ |
| 13 | 13 | |
| 14 | -chdir(dirname(__FILE__)); // to enable our relative pathes to work |
|
| 14 | +chdir(dirname(__FILE__)); // to enable our relative pathes to work |
|
| 15 | 15 | |
| 16 | 16 | if (php_sapi_name() !== 'cli') // security precaution: forbit calling as web-page |
| 17 | 17 | { |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | } |
| 40 | 40 | $ids = explode(',', $_SERVER['argv'][0]); |
| 41 | 41 | $change = array(); |
| 42 | -while($ids) |
|
| 42 | +while ($ids) |
|
| 43 | 43 | { |
| 44 | 44 | $from = (int)array_shift($ids); |
| 45 | 45 | $to = (int)array_shift($ids); |
@@ -66,24 +66,24 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | chown_grp($path, null, $recursive); |
| 68 | 68 | |
| 69 | -function chown_grp($path, array $stat=null, $recursive=false) |
|
| 69 | +function chown_grp($path, array $stat = null, $recursive = false) |
|
| 70 | 70 | { |
| 71 | 71 | global $change; |
| 72 | 72 | |
| 73 | 73 | if (is_null($stat) && !($stat = stat($path))) return false; |
| 74 | 74 | |
| 75 | - if (isset($change[$stat['uid']]) && !chown($path, $uid=$change[$stat['uid']])) |
|
| 75 | + if (isset($change[$stat['uid']]) && !chown($path, $uid = $change[$stat['uid']])) |
|
| 76 | 76 | { |
| 77 | 77 | echo "Faild to set new owner #$uid for $path\n"; |
| 78 | 78 | } |
| 79 | - if (isset($change[-$stat['gid']]) && !chgrp($path, $gid=-$change[-$stat['gid']])) |
|
| 79 | + if (isset($change[-$stat['gid']]) && !chgrp($path, $gid = -$change[-$stat['gid']])) |
|
| 80 | 80 | { |
| 81 | 81 | echo "Faild to set new group #$gid for $path\n"; |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | if ($recursive && is_dir($path)) |
| 85 | 85 | { |
| 86 | - foreach(new DirectoryIterator($path) as $child) |
|
| 86 | + foreach (new DirectoryIterator($path) as $child) |
|
| 87 | 87 | { |
| 88 | 88 | if (!$child->isDot()) |
| 89 | 89 | chown_grp($child->getPathname(), array( |
@@ -13,10 +13,13 @@ discard block |
||
| 13 | 13 | |
| 14 | 14 | chdir(dirname(__FILE__)); // to enable our relative pathes to work |
| 15 | 15 | |
| 16 | -if (php_sapi_name() !== 'cli') // security precaution: forbit calling as web-page |
|
| 16 | +if (php_sapi_name() !== 'cli') |
|
| 17 | +{ |
|
| 18 | + // security precaution: forbit calling as web-page |
|
| 17 | 19 | { |
| 18 | 20 | die('<h1>setup/doc/chown.php must NOT be called as web-page --> exiting !!!</h1>'); |
| 19 | 21 | } |
| 22 | +} |
|
| 20 | 23 | |
| 21 | 24 | $recursive = false; |
| 22 | 25 | |
@@ -70,7 +73,10 @@ discard block |
||
| 70 | 73 | { |
| 71 | 74 | global $change; |
| 72 | 75 | |
| 73 | - if (is_null($stat) && !($stat = stat($path))) return false; |
|
| 76 | + if (is_null($stat) && !($stat = stat($path))) |
|
| 77 | + { |
|
| 78 | + return false; |
|
| 79 | + } |
|
| 74 | 80 | |
| 75 | 81 | if (isset($change[$stat['uid']]) && !chown($path, $uid=$change[$stat['uid']])) |
| 76 | 82 | { |
@@ -86,10 +92,12 @@ discard block |
||
| 86 | 92 | foreach(new DirectoryIterator($path) as $child) |
| 87 | 93 | { |
| 88 | 94 | if (!$child->isDot()) |
| 89 | - chown_grp($child->getPathname(), array( |
|
| 95 | + { |
|
| 96 | + chown_grp($child->getPathname(), array( |
|
| 90 | 97 | 'uid' => $child->getOwner(), |
| 91 | 98 | 'gid' => $child->getGroup(), |
| 92 | 99 | ), $recursive); |
| 100 | + } |
|
| 93 | 101 | } |
| 94 | 102 | } |
| 95 | 103 | } |
@@ -12,15 +12,15 @@ |
||
| 12 | 12 | $phpgw_baseline = array( |
| 13 | 13 | 'egw_importexport_definitions' => array( |
| 14 | 14 | 'fd' => array( |
| 15 | - 'definition_id' => array('type' => 'auto','nullable' => False), |
|
| 16 | - 'name' => array('type' => 'varchar','precision' => '255'), |
|
| 17 | - 'application' => array('type' => 'varchar','precision' => '50'), |
|
| 18 | - 'plugin' => array('type' => 'varchar','precision' => '100'), |
|
| 19 | - 'type' => array('type' => 'varchar','precision' => '20'), |
|
| 20 | - 'allowed_users' => array('type' => 'varchar','meta' => 'account-commasep','precision' => '255'), |
|
| 15 | + 'definition_id' => array('type' => 'auto', 'nullable' => False), |
|
| 16 | + 'name' => array('type' => 'varchar', 'precision' => '255'), |
|
| 17 | + 'application' => array('type' => 'varchar', 'precision' => '50'), |
|
| 18 | + 'plugin' => array('type' => 'varchar', 'precision' => '100'), |
|
| 19 | + 'type' => array('type' => 'varchar', 'precision' => '20'), |
|
| 20 | + 'allowed_users' => array('type' => 'varchar', 'meta' => 'account-commasep', 'precision' => '255'), |
|
| 21 | 21 | 'plugin_options' => array('type' => 'longtext'), |
| 22 | - 'owner' => array('type' => 'int','meta' => 'account','precision' => '4'), |
|
| 23 | - 'description' => array('type' => 'varchar','precision' => '255'), |
|
| 22 | + 'owner' => array('type' => 'int', 'meta' => 'account', 'precision' => '4'), |
|
| 23 | + 'description' => array('type' => 'varchar', 'precision' => '255'), |
|
| 24 | 24 | 'modified' => array('type' => 'timestamp'), |
| 25 | 25 | 'filter' => array('type' => 'longtext') |
| 26 | 26 | ), |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | |
| 14 | 14 | function importexport_upgrade0_002() |
| 15 | 15 | { |
| 16 | - $GLOBALS['egw_setup']->oProc->AddColumn('egw_importexport_definitions','description',array( |
|
| 16 | + $GLOBALS['egw_setup']->oProc->AddColumn('egw_importexport_definitions', 'description', array( |
|
| 17 | 17 | 'type' => 'varchar', |
| 18 | 18 | 'precision' => '255' |
| 19 | 19 | )); |
@@ -44,11 +44,11 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | function importexport_upgrade1_8() |
| 46 | 46 | { |
| 47 | - $GLOBALS['egw_setup']->oProc->AlterColumn('egw_importexport_definitions','definition_id',array( |
|
| 47 | + $GLOBALS['egw_setup']->oProc->AlterColumn('egw_importexport_definitions', 'definition_id', array( |
|
| 48 | 48 | 'type' => 'auto', |
| 49 | 49 | 'nullable' => False |
| 50 | 50 | )); |
| 51 | - $GLOBALS['egw_setup']->oProc->AddColumn('egw_importexport_definitions','modified',array( |
|
| 51 | + $GLOBALS['egw_setup']->oProc->AddColumn('egw_importexport_definitions', 'modified', array( |
|
| 52 | 52 | 'type' => 'timestamp' |
| 53 | 53 | )); |
| 54 | 54 | |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | function importexport_upgrade1_9_002() |
| 65 | 65 | { |
| 66 | - $GLOBALS['egw_setup']->oProc->AddColumn('egw_importexport_definitions','filter',array( |
|
| 66 | + $GLOBALS['egw_setup']->oProc->AddColumn('egw_importexport_definitions', 'filter', array( |
|
| 67 | 67 | 'type' => 'longtext' |
| 68 | 68 | )); |
| 69 | 69 | |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | // import i/e defintions |
| 75 | 75 | if (extension_loaded('dom')) |
| 76 | 76 | { |
| 77 | - require_once(EGW_INCLUDE_ROOT. '/importexport/inc/class.importexport_definitions_bo.inc.php'); |
|
| 77 | + require_once(EGW_INCLUDE_ROOT.'/importexport/inc/class.importexport_definitions_bo.inc.php'); |
|
| 78 | 78 | |
| 79 | 79 | // This sets up $GLOBALS['egw']->accounts and $GLOBALS['egw']->db |
| 80 | 80 | $GLOBALS['egw_setup']->setup_account_object(); |
@@ -82,18 +82,18 @@ discard block |
||
| 82 | 82 | // step through every source code intstalled app |
| 83 | 83 | $egwdir = dir(EGW_INCLUDE_ROOT); |
| 84 | 84 | while (false !== ($appdir = $egwdir->read())) { |
| 85 | - $defdir = EGW_INCLUDE_ROOT. "/$appdir/setup/"; |
|
| 86 | - if ( !is_dir( $defdir ) ) continue; |
|
| 85 | + $defdir = EGW_INCLUDE_ROOT."/$appdir/setup/"; |
|
| 86 | + if (!is_dir($defdir)) continue; |
|
| 87 | 87 | |
| 88 | 88 | // step through each file in defdir of app |
| 89 | 89 | $d = dir($defdir); |
| 90 | 90 | while (false !== ($entry = $d->read())) { |
| 91 | 91 | try |
| 92 | 92 | { |
| 93 | - $file = $defdir. '/'. $entry; |
|
| 94 | - list( $filename, $extension) = explode('.',$entry); |
|
| 95 | - if ( $extension != 'xml' ) continue; |
|
| 96 | - importexport_definitions_bo::import( $file ); |
|
| 93 | + $file = $defdir.'/'.$entry; |
|
| 94 | + list($filename, $extension) = explode('.', $entry); |
|
| 95 | + if ($extension != 'xml') continue; |
|
| 96 | + importexport_definitions_bo::import($file); |
|
| 97 | 97 | } |
| 98 | 98 | catch (Exception $e) |
| 99 | 99 | { |
@@ -104,10 +104,10 @@ discard block |
||
| 104 | 104 | } |
| 105 | 105 | } |
| 106 | 106 | // give Default and Admins group rights for ImportExport |
| 107 | - foreach(array('Default' => 'Default','Admins' => 'Admin') as $account_lid => $name) |
|
| 107 | + foreach (array('Default' => 'Default', 'Admins' => 'Admin') as $account_lid => $name) |
|
| 108 | 108 | { |
| 109 | - $account_id = $GLOBALS['egw_setup']->add_account($account_lid,$name,'Group',False,False); |
|
| 110 | - $GLOBALS['egw_setup']->add_acl('importexport','run',$account_id); |
|
| 109 | + $account_id = $GLOBALS['egw_setup']->add_account($account_lid, $name, 'Group', False, False); |
|
| 110 | + $GLOBALS['egw_setup']->add_acl('importexport', 'run', $account_id); |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | return $GLOBALS['setup_info']['importexport']['currentver'] = '1.9.004'; |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | |
| 116 | 116 | function importexport_upgrade1_9_003() |
| 117 | 117 | { |
| 118 | - $GLOBALS['egw_setup']->oProc->AddColumn('egw_importexport_definitions','filter',array( |
|
| 118 | + $GLOBALS['egw_setup']->oProc->AddColumn('egw_importexport_definitions', 'filter', array( |
|
| 119 | 119 | 'type' => 'longtext' |
| 120 | 120 | )); |
| 121 | 121 | |
@@ -81,18 +81,26 @@ |
||
| 81 | 81 | |
| 82 | 82 | // step through every source code intstalled app |
| 83 | 83 | $egwdir = dir(EGW_INCLUDE_ROOT); |
| 84 | - while (false !== ($appdir = $egwdir->read())) { |
|
| 84 | + while (false !== ($appdir = $egwdir->read())) |
|
| 85 | + { |
|
| 85 | 86 | $defdir = EGW_INCLUDE_ROOT. "/$appdir/setup/"; |
| 86 | - if ( !is_dir( $defdir ) ) continue; |
|
| 87 | + if ( !is_dir( $defdir ) ) |
|
| 88 | + { |
|
| 89 | + continue; |
|
| 90 | + } |
|
| 87 | 91 | |
| 88 | 92 | // step through each file in defdir of app |
| 89 | 93 | $d = dir($defdir); |
| 90 | - while (false !== ($entry = $d->read())) { |
|
| 94 | + while (false !== ($entry = $d->read())) |
|
| 95 | + { |
|
| 91 | 96 | try |
| 92 | 97 | { |
| 93 | 98 | $file = $defdir. '/'. $entry; |
| 94 | 99 | list( $filename, $extension) = explode('.',$entry); |
| 95 | - if ( $extension != 'xml' ) continue; |
|
| 100 | + if ( $extension != 'xml' ) |
|
| 101 | + { |
|
| 102 | + continue; |
|
| 103 | + } |
|
| 96 | 104 | importexport_definitions_bo::import( $file ); |
| 97 | 105 | } |
| 98 | 106 | catch (Exception $e) |
@@ -12,9 +12,9 @@ discard block |
||
| 12 | 12 | if (!extension_loaded('dom')) |
| 13 | 13 | { |
| 14 | 14 | echo "<p>Required PHP DOM extension missing, installation of ImportExport definitions aborted.</p>\n"; |
| 15 | - return; // otherwise we mess up the whole eGroupware install process |
|
| 15 | + return; // otherwise we mess up the whole eGroupware install process |
|
| 16 | 16 | } |
| 17 | -require_once(EGW_INCLUDE_ROOT. '/importexport/inc/class.importexport_definitions_bo.inc.php'); |
|
| 17 | +require_once(EGW_INCLUDE_ROOT.'/importexport/inc/class.importexport_definitions_bo.inc.php'); |
|
| 18 | 18 | |
| 19 | 19 | // This sets up $GLOBALS['egw']->accounts and $GLOBALS['egw']->db |
| 20 | 20 | $GLOBALS['egw_setup']->setup_account_object(); |
@@ -22,22 +22,22 @@ discard block |
||
| 22 | 22 | // step through every source code intstalled app |
| 23 | 23 | $egwdir = dir(EGW_INCLUDE_ROOT); |
| 24 | 24 | while (false !== ($appdir = $egwdir->read())) { |
| 25 | - $defdir = EGW_INCLUDE_ROOT. "/$appdir/setup/"; |
|
| 26 | - if ( !is_dir( $defdir ) ) continue; |
|
| 25 | + $defdir = EGW_INCLUDE_ROOT."/$appdir/setup/"; |
|
| 26 | + if (!is_dir($defdir)) continue; |
|
| 27 | 27 | |
| 28 | 28 | // step through each file in defdir of app |
| 29 | 29 | $d = dir($defdir); |
| 30 | 30 | while (false !== ($entry = $d->read())) { |
| 31 | - $file = $defdir. '/'. $entry; |
|
| 32 | - list( $filename, $extension) = explode('.',$entry); |
|
| 33 | - if ( $extension != 'xml' ) continue; |
|
| 34 | - importexport_definitions_bo::import( $file ); |
|
| 31 | + $file = $defdir.'/'.$entry; |
|
| 32 | + list($filename, $extension) = explode('.', $entry); |
|
| 33 | + if ($extension != 'xml') continue; |
|
| 34 | + importexport_definitions_bo::import($file); |
|
| 35 | 35 | } |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | // give Default and Admins group rights for ImportExport |
| 39 | -foreach(array('Default' => 'Default','Admins' => 'Admin') as $account_lid => $name) |
|
| 39 | +foreach (array('Default' => 'Default', 'Admins' => 'Admin') as $account_lid => $name) |
|
| 40 | 40 | { |
| 41 | - $account_id = $GLOBALS['egw_setup']->add_account($account_lid,$name,'Group',False,False); |
|
| 42 | - $GLOBALS['egw_setup']->add_acl('importexport','run',$account_id); |
|
| 41 | + $account_id = $GLOBALS['egw_setup']->add_account($account_lid, $name, 'Group', False, False); |
|
| 42 | + $GLOBALS['egw_setup']->add_acl('importexport', 'run', $account_id); |
|
| 43 | 43 | } |
@@ -21,16 +21,24 @@ |
||
| 21 | 21 | |
| 22 | 22 | // step through every source code intstalled app |
| 23 | 23 | $egwdir = dir(EGW_INCLUDE_ROOT); |
| 24 | -while (false !== ($appdir = $egwdir->read())) { |
|
| 24 | +while (false !== ($appdir = $egwdir->read())) |
|
| 25 | +{ |
|
| 25 | 26 | $defdir = EGW_INCLUDE_ROOT. "/$appdir/setup/"; |
| 26 | - if ( !is_dir( $defdir ) ) continue; |
|
| 27 | + if ( !is_dir( $defdir ) ) |
|
| 28 | + { |
|
| 29 | + continue; |
|
| 30 | + } |
|
| 27 | 31 | |
| 28 | 32 | // step through each file in defdir of app |
| 29 | 33 | $d = dir($defdir); |
| 30 | - while (false !== ($entry = $d->read())) { |
|
| 34 | + while (false !== ($entry = $d->read())) |
|
| 35 | + { |
|
| 31 | 36 | $file = $defdir. '/'. $entry; |
| 32 | 37 | list( $filename, $extension) = explode('.',$entry); |
| 33 | - if ( $extension != 'xml' ) continue; |
|
| 38 | + if ( $extension != 'xml' ) |
|
| 39 | + { |
|
| 40 | + continue; |
|
| 41 | + } |
|
| 34 | 42 | importexport_definitions_bo::import( $file ); |
| 35 | 43 | } |
| 36 | 44 | } |
@@ -88,33 +88,33 @@ |
||
| 88 | 88 | public function get_selectors_etpl(); |
| 89 | 89 | |
| 90 | 90 | /** |
| 91 | - * Returns errors that were encountered during importing |
|
| 92 | - * Maximum of one error message per record, but you can concatenate them if you need to |
|
| 93 | - * |
|
| 94 | - * @return Array ( |
|
| 95 | - * record_# => error message |
|
| 96 | - * ) |
|
| 97 | - */ |
|
| 91 | + * Returns errors that were encountered during importing |
|
| 92 | + * Maximum of one error message per record, but you can concatenate them if you need to |
|
| 93 | + * |
|
| 94 | + * @return Array ( |
|
| 95 | + * record_# => error message |
|
| 96 | + * ) |
|
| 97 | + */ |
|
| 98 | 98 | public function get_errors(); |
| 99 | 99 | |
| 100 | 100 | /** |
| 101 | - * Returns warnings that were encountered during importing |
|
| 102 | - * Maximum of one warning message per record, but you can concatenate them if you need to |
|
| 103 | - * |
|
| 104 | - * @return Array ( |
|
| 105 | - * record_# => warning message |
|
| 106 | - * ) |
|
| 107 | - */ |
|
| 101 | + * Returns warnings that were encountered during importing |
|
| 102 | + * Maximum of one warning message per record, but you can concatenate them if you need to |
|
| 103 | + * |
|
| 104 | + * @return Array ( |
|
| 105 | + * record_# => warning message |
|
| 106 | + * ) |
|
| 107 | + */ |
|
| 108 | 108 | public function get_warnings(); |
| 109 | 109 | |
| 110 | 110 | /** |
| 111 | - * Returns a list of actions taken, and the number of records for that action. |
|
| 112 | - * Actions are things like 'insert', 'update', 'delete', and may be different for each plugin. |
|
| 113 | - * |
|
| 114 | - * @return Array ( |
|
| 115 | - * action => record count |
|
| 116 | - * ) |
|
| 117 | - */ |
|
| 111 | + * Returns a list of actions taken, and the number of records for that action. |
|
| 112 | + * Actions are things like 'insert', 'update', 'delete', and may be different for each plugin. |
|
| 113 | + * |
|
| 114 | + * @return Array ( |
|
| 115 | + * action => record count |
|
| 116 | + * ) |
|
| 117 | + */ |
|
| 118 | 118 | public function get_results(); |
| 119 | 119 | |
| 120 | 120 | } // end of iface_export_plugin |
@@ -24,7 +24,8 @@ |
||
| 24 | 24 | * So this interface just garanties the interaction with userinterfaces. It |
| 25 | 25 | * has nothing to do with datatypes. |
| 26 | 26 | */ |
| 27 | -interface importexport_iface_import_plugin { |
|
| 27 | +interface importexport_iface_import_plugin |
|
| 28 | +{ |
|
| 28 | 29 | |
| 29 | 30 | /** |
| 30 | 31 | * imports entries according to given definition object. |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | * @param definition $_definition |
| 34 | 34 | * @return int number of successful imports |
| 35 | 35 | */ |
| 36 | - public function import( $_stream, importexport_definition $_definition ); |
|
| 36 | + public function import($_stream, importexport_definition $_definition); |
|
| 37 | 37 | |
| 38 | 38 | /** |
| 39 | 39 | * Reads entries, and presents them back as they will be understood |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | * preserv => array, |
| 80 | 80 | * ) |
| 81 | 81 | */ |
| 82 | - public function get_options_etpl(importexport_definition &$definition=null); |
|
| 82 | + public function get_options_etpl(importexport_definition &$definition = null); |
|
| 83 | 83 | |
| 84 | 84 | /** |
| 85 | 85 | * returns etemplate name for slectors of this plugin |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | * @param array $_options options for specific backends |
| 34 | 34 | * @return bool |
| 35 | 35 | */ |
| 36 | - public function __construct( $_stream, array $_options ); |
|
| 36 | + public function __construct($_stream, array $_options); |
|
| 37 | 37 | |
| 38 | 38 | /** |
| 39 | 39 | * exports a record into resource of handle |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | * @param object of interface egw_record _record |
| 42 | 42 | * @return bool |
| 43 | 43 | */ |
| 44 | - public function export_record( importexport_iface_egw_record $_record ); |
|
| 44 | + public function export_record(importexport_iface_egw_record $_record); |
|
| 45 | 45 | |
| 46 | 46 | /** |
| 47 | 47 | * Retruns total number of exported records. |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | * @param array $_options options for specific backends |
| 28 | 28 | * @return bool |
| 29 | 29 | */ |
| 30 | - public function __construct( $_stream, array $_options ); |
|
| 30 | + public function __construct($_stream, array $_options); |
|
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | 33 | * cleanup |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | * @param string _position may be: {first|last|next|previous|somenumber} |
| 43 | 43 | * @return bool |
| 44 | 44 | */ |
| 45 | - public function get_record( $_position = 'next' ); |
|
| 45 | + public function get_record($_position = 'next'); |
|
| 46 | 46 | |
| 47 | 47 | /** |
| 48 | 48 | * Retruns total number of records for the open resource. |