author | Dan Fuhry <dan@enanocms.org> |
Sat, 21 Aug 2010 23:30:56 -0400 | |
changeset 1294 | f61a263564b2 |
parent 1227 | bdac73ed481e |
permissions | -rw-r--r-- |
812
68060328e9c6
Added CLI installer. Supports interactive, command-line, and internal-call installation. Fixed a few bugs related to anti-SQL injection parser and plugin installation.
Dan
parents:
diff
changeset
|
1 |
<?php |
68060328e9c6
Added CLI installer. Supports interactive, command-line, and internal-call installation. Fixed a few bugs related to anti-SQL injection parser and plugin installation.
Dan
parents:
diff
changeset
|
2 |
|
68060328e9c6
Added CLI installer. Supports interactive, command-line, and internal-call installation. Fixed a few bugs related to anti-SQL injection parser and plugin installation.
Dan
parents:
diff
changeset
|
3 |
/* |
68060328e9c6
Added CLI installer. Supports interactive, command-line, and internal-call installation. Fixed a few bugs related to anti-SQL injection parser and plugin installation.
Dan
parents:
diff
changeset
|
4 |
* Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between |
1081
745200a9cc2a
Fixed some upgrade bugs; added support for choosing one's own date/time formats; rebrand as 1.1.7
Dan
parents:
945
diff
changeset
|
5 |
* Copyright (C) 2006-2009 Dan Fuhry |
812
68060328e9c6
Added CLI installer. Supports interactive, command-line, and internal-call installation. Fixed a few bugs related to anti-SQL injection parser and plugin installation.
Dan
parents:
diff
changeset
|
6 |
* Installation package |
68060328e9c6
Added CLI installer. Supports interactive, command-line, and internal-call installation. Fixed a few bugs related to anti-SQL injection parser and plugin installation.
Dan
parents:
diff
changeset
|
7 |
* libenanoinstallcli.php - Installer frontend logic, CLI version |
68060328e9c6
Added CLI installer. Supports interactive, command-line, and internal-call installation. Fixed a few bugs related to anti-SQL injection parser and plugin installation.
Dan
parents:
diff
changeset
|
8 |
* |
68060328e9c6
Added CLI installer. Supports interactive, command-line, and internal-call installation. Fixed a few bugs related to anti-SQL injection parser and plugin installation.
Dan
parents:
diff
changeset
|
9 |
* This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License |
68060328e9c6
Added CLI installer. Supports interactive, command-line, and internal-call installation. Fixed a few bugs related to anti-SQL injection parser and plugin installation.
Dan
parents:
diff
changeset
|
10 |
* as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. |
68060328e9c6
Added CLI installer. Supports interactive, command-line, and internal-call installation. Fixed a few bugs related to anti-SQL injection parser and plugin installation.
Dan
parents:
diff
changeset
|
11 |
* |
68060328e9c6
Added CLI installer. Supports interactive, command-line, and internal-call installation. Fixed a few bugs related to anti-SQL injection parser and plugin installation.
Dan
parents:
diff
changeset
|
12 |
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied |
68060328e9c6
Added CLI installer. Supports interactive, command-line, and internal-call installation. Fixed a few bugs related to anti-SQL injection parser and plugin installation.
Dan
parents:
diff
changeset
|
13 |
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. |
68060328e9c6
Added CLI installer. Supports interactive, command-line, and internal-call installation. Fixed a few bugs related to anti-SQL injection parser and plugin installation.
Dan
parents:
diff
changeset
|
14 |
*/ |
68060328e9c6
Added CLI installer. Supports interactive, command-line, and internal-call installation. Fixed a few bugs related to anti-SQL injection parser and plugin installation.
Dan
parents:
diff
changeset
|
15 |
|
68060328e9c6
Added CLI installer. Supports interactive, command-line, and internal-call installation. Fixed a few bugs related to anti-SQL injection parser and plugin installation.
Dan
parents:
diff
changeset
|
16 |
function run_installer_stage($stage_id, $stage_name, $function, $failure_explanation, $allow_skip = true) |
68060328e9c6
Added CLI installer. Supports interactive, command-line, and internal-call installation. Fixed a few bugs related to anti-SQL injection parser and plugin installation.
Dan
parents:
diff
changeset
|
17 |
{ |
1227
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents:
1081
diff
changeset
|
18 |
global $silent, $lang; |
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents:
1081
diff
changeset
|
19 |
|
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents:
1081
diff
changeset
|
20 |
if ( !$silent ) |
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents:
1081
diff
changeset
|
21 |
echo parse_shellcolor_string($lang->get("cli_msg_$stage_name")); |
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents:
1081
diff
changeset
|
22 |
|
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents:
1081
diff
changeset
|
23 |
$result = call_user_func($function); |
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents:
1081
diff
changeset
|
24 |
|
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents:
1081
diff
changeset
|
25 |
if ( !$result ) |
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents:
1081
diff
changeset
|
26 |
{ |
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents:
1081
diff
changeset
|
27 |
if ( !$silent ) |
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents:
1081
diff
changeset
|
28 |
echo parse_shellcolor_string($lang->get('cli_test_fail')) . "\n"; |
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents:
1081
diff
changeset
|
29 |
installer_fail($lang->get("cli_err_$stage_name")); |
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents:
1081
diff
changeset
|
30 |
} |
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents:
1081
diff
changeset
|
31 |
|
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents:
1081
diff
changeset
|
32 |
if ( !$silent ) |
bdac73ed481e
Going ahead with the switch to tabs. This is a major coding standards change! If any unusual parser bugs show up, check this changeset. Converted all .php, .js, .tpl, .css, and .json files and did basic testing.
Dan
parents:
1081
diff
changeset
|
33 |
echo parse_shellcolor_string($lang->get('cli_msg_ok')) . "\n"; |
812
68060328e9c6
Added CLI installer. Supports interactive, command-line, and internal-call installation. Fixed a few bugs related to anti-SQL injection parser and plugin installation.
Dan
parents:
diff
changeset
|
34 |
} |
68060328e9c6
Added CLI installer. Supports interactive, command-line, and internal-call installation. Fixed a few bugs related to anti-SQL injection parser and plugin installation.
Dan
parents:
diff
changeset
|
35 |