equal
deleted
inserted
replaced
13 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. |
13 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. |
14 */ |
14 */ |
15 |
15 |
16 function run_installer_stage($stage_id, $stage_name, $function, $failure_explanation, $allow_skip = true) |
16 function run_installer_stage($stage_id, $stage_name, $function, $failure_explanation, $allow_skip = true) |
17 { |
17 { |
18 global $silent, $lang; |
18 global $silent, $lang; |
19 |
19 |
20 if ( !$silent ) |
20 if ( !$silent ) |
21 echo parse_shellcolor_string($lang->get("cli_msg_$stage_name")); |
21 echo parse_shellcolor_string($lang->get("cli_msg_$stage_name")); |
22 |
22 |
23 $result = call_user_func($function); |
23 $result = call_user_func($function); |
24 |
24 |
25 if ( !$result ) |
25 if ( !$result ) |
26 { |
26 { |
27 if ( !$silent ) |
27 if ( !$silent ) |
28 echo parse_shellcolor_string($lang->get('cli_test_fail')) . "\n"; |
28 echo parse_shellcolor_string($lang->get('cli_test_fail')) . "\n"; |
29 installer_fail($lang->get("cli_err_$stage_name")); |
29 installer_fail($lang->get("cli_err_$stage_name")); |
30 } |
30 } |
31 |
31 |
32 if ( !$silent ) |
32 if ( !$silent ) |
33 echo parse_shellcolor_string($lang->get('cli_msg_ok')) . "\n"; |
33 echo parse_shellcolor_string($lang->get('cli_msg_ok')) . "\n"; |
34 } |
34 } |
35 |
35 |