author | Dan |
Mon, 21 Jan 2008 19:54:29 -0500 | |
changeset 366 | 7e16181545e1 |
parent 352 | 9d7225c0db6d |
child 371 | dc6026376919 |
permissions | -rw-r--r-- |
352
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
1 |
<?php |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
2 |
|
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
3 |
/* |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
4 |
* Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
5 |
* Version 1.1.1 |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
6 |
* Copyright (C) 2006-2007 Dan Fuhry |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
7 |
* Installation package |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
8 |
* finish.php - Installer finalization stage |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
9 |
* |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
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 |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
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. |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
12 |
* |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
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 |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
14 |
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
15 |
*/ |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
16 |
|
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
17 |
if ( !defined('IN_ENANO_INSTALL') ) |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
18 |
die(); |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
19 |
|
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
20 |
require ( ENANO_ROOT . '/install/includes/libenanoinstall.php' ); |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
21 |
require ( ENANO_ROOT . '/install/includes/sql_parse.php' ); |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
22 |
require ( ENANO_ROOT . '/includes/common.php' ); |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
23 |
|
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
24 |
if ( !in_array($dbdriver, $supported_drivers) ) |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
25 |
{ |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
26 |
$ui->show_header(); |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
27 |
echo '<h3>Installation error</h3> |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
28 |
<p>ERROR: That database driver is not supported.</p>'; |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
29 |
return true; |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
30 |
} |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
31 |
|
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
32 |
$db = new $dbdriver(); |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
33 |
$db->connect(); |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
34 |
|
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
35 |
$ui->show_header(); |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
36 |
flush(); |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
37 |
|
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
38 |
?> |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
39 |
<h3>Performing final installation steps</h3> |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
40 |
<p>Enano is cleaning up and performing some final installation tasks. Please wait...</p> |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
41 |
|
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
42 |
<?php |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
43 |
|
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
44 |
@set_time_limit(0); |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
45 |
|
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
46 |
function stg_load_files() |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
47 |
{ |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
48 |
global $dbdriver; |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
49 |
if ( !@include( ENANO_ROOT . "/install/includes/payload.php" ) ) |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
50 |
return false; |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
51 |
|
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
52 |
return true; |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
53 |
} |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
54 |
|
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
55 |
// FIXME: l10n |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
56 |
start_install_table(); |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
57 |
|
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
58 |
run_installer_stage('load', 'Load installer files', 'stg_load_files', 'One of the files needed for installation couldn\'t be loaded. Please check your Enano directory.', false); |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
59 |
run_installer_stage('cleanup', 'Clean up encryption keys', 'stg_aes_cleanup', 'There was a database error while removing the temporary encryption keys from the database. For maximum site security you should delete the config entries install_aes_key and site_aes_key manually.', false); |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
60 |
run_installer_stage('buildindex', $lang->get('install_stg_buildindex_title'), 'stg_build_index', $lang->get('install_stg_buildindex_body')); |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
61 |
run_installer_stage('renameconfig', $lang->get('install_stg_rename_title'), 'stg_rename_config', $lang->get('install_stg_rename_body', array('mainpage_link' => scriptPath . '/index.php'))); |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
62 |
|
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
63 |
close_install_table(); |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
64 |
|
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
65 |
?> |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
66 |
<h3>Congratulations! You've finished installing Enano.</h3> |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
67 |
<p>Enano has finished setting up on your server. Now you can go to your <a href="<?php echo makeUrlNS('Article', 'Main_Page');?>">new |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
68 |
website</a> and start creating content!</p> |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
69 |
<?php |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
70 |
echo $lang->get('finish_body'); |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
71 |
echo '<p>' . $lang->get('finish_link_mainpage', array('mainpage_link' => scriptPath . '/index.php')) . '</p>'; |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
72 |
?> |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
73 |
<?php |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
74 |
|
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
75 |
$db->close(); |
9d7225c0db6d
Enano's new installable installer, alpha 1. No upgrade and (in some parts) very little localization.
Dan
parents:
diff
changeset
|
76 |