author | Dan |
Wed, 27 May 2009 09:45:54 -0400 | |
changeset 1006 | ec33f6cb333d |
parent 945 | c19242d13a49 |
child 1081 | 745200a9cc2a |
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 |
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
|
5 |
* Version 1.1.6 (Caoineag beta 1) |
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 |
* Copyright (C) 2006-2008 Dan Fuhry |
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 |
* 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
|
8 |
* 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
|
9 |
* |
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 |
* 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
|
11 |
* 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
|
12 |
* |
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 |
* 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
|
14 |
* 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
|
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 |
|
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 |
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
|
18 |
{ |
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
|
19 |
global $silent, $lang; |
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
|
20 |
|
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
|
21 |
if ( !$silent ) |
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
|
22 |
echo parse_shellcolor_string($lang->get("cli_msg_$stage_name")); |
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
|
23 |
|
945
c19242d13a49
Removed "@" from all call_user_func() calls to make debugging special pages and such possible
Dan
parents:
812
diff
changeset
|
24 |
$result = call_user_func($function); |
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
|
25 |
|
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
|
26 |
if ( !$result ) |
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
|
27 |
{ |
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
|
28 |
if ( !$silent ) |
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
|
29 |
echo parse_shellcolor_string($lang->get('cli_test_fail')) . "\n"; |
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
|
30 |
installer_fail($lang->get("cli_err_$stage_name")); |
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
|
31 |
} |
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
|
32 |
|
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
|
33 |
if ( !$silent ) |
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 |
echo parse_shellcolor_string($lang->get('cli_msg_ok')) . "\n"; |
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 |
} |
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
|
36 |