equal
deleted
inserted
replaced
|
1 <?php |
|
2 |
|
3 /* |
|
4 * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between |
|
5 * Version 1.1.6 (Caoineag beta 1) |
|
6 * Copyright (C) 2006-2008 Dan Fuhry |
|
7 * Installation package |
|
8 * libenanoinstallcli.php - Installer frontend logic, CLI version |
|
9 * |
|
10 * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License |
|
11 * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. |
|
12 * |
|
13 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied |
|
14 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. |
|
15 */ |
|
16 |
|
17 function run_installer_stage($stage_id, $stage_name, $function, $failure_explanation, $allow_skip = true) |
|
18 { |
|
19 global $silent, $lang; |
|
20 |
|
21 if ( !$silent ) |
|
22 echo parse_shellcolor_string($lang->get("cli_msg_$stage_name")); |
|
23 |
|
24 $result = @call_user_func($function); |
|
25 |
|
26 if ( !$result ) |
|
27 { |
|
28 if ( !$silent ) |
|
29 echo parse_shellcolor_string($lang->get('cli_test_fail')) . "\n"; |
|
30 installer_fail($lang->get("cli_err_$stage_name")); |
|
31 } |
|
32 |
|
33 if ( !$silent ) |
|
34 echo parse_shellcolor_string($lang->get('cli_msg_ok')) . "\n"; |
|
35 } |
|
36 |