354
979d99a0b00e
A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
Dan
parents:
diff
changeset
+ − 1
<?php
979d99a0b00e
A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
Dan
parents:
diff
changeset
+ − 2
979d99a0b00e
A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
Dan
parents:
diff
changeset
+ − 3
/*
979d99a0b00e
A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
Dan
parents:
diff
changeset
+ − 4
* Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
685
17ebe24cdf85
Rebranded as 1.1.5 (Caoineag alpha 5) and fixed a couple bugs related to CDN support in template_nodb and installerUI. Updated readme.
Dan
diff
changeset
+ − 5
* Version 1.1.5 (Caoineag alpha 5)
536
+ − 6
* Copyright (C) 2006-2008 Dan Fuhry
354
979d99a0b00e
A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
Dan
parents:
diff
changeset
+ − 7
* Installation package
979d99a0b00e
A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
Dan
parents:
diff
changeset
+ − 8
* upgrade.php - Upgrade interface
979d99a0b00e
A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
Dan
parents:
diff
changeset
+ − 9
*
979d99a0b00e
A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
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
979d99a0b00e
A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
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.
979d99a0b00e
A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
Dan
parents:
diff
changeset
+ − 12
*
979d99a0b00e
A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
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
979d99a0b00e
A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
Dan
parents:
diff
changeset
+ − 14
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
979d99a0b00e
A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
Dan
parents:
diff
changeset
+ − 15
*/
979d99a0b00e
A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
Dan
parents:
diff
changeset
+ − 16
979d99a0b00e
A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
Dan
parents:
diff
changeset
+ − 17
define('IN_ENANO', 1);
979d99a0b00e
A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
Dan
parents:
diff
changeset
+ − 18
494
+ − 19
// The list of versions in THIS AND PREVIOUS branches, in chronological order.
+ − 20
$enano_versions = array();
+ − 21
$enano_versions['1.0'] = array('1.0', '1.0.1', '1.0.2b1', '1.0.2', '1.0.3', '1.0.4');
685
17ebe24cdf85
Rebranded as 1.1.5 (Caoineag alpha 5) and fixed a couple bugs related to CDN support in template_nodb and installerUI. Updated readme.
Dan
diff
changeset
+ − 22
$enano_versions['1.1'] = array('1.1.1', '1.1.2', '1.1.3', '1.1.4', '1.1.5');
411
+ − 23
377
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 24
// Turn on every imaginable API hack to make common load on older databases
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 25
define('IN_ENANO_UPGRADE', 1);
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 26
define('IN_ENANO_MIGRATION', 1);
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 27
define('ENANO_ALLOW_LOAD_NOLANG', 1);
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 28
@ini_set('display_errors', 'on');
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 29
494
+ − 30
// Load installer files
526
b2fb50d572c7
New plugin manager half-implemented. Most of the UI/frontend code is done. Moved sql_parse.php to /includes/ to allow use after installation - TODO: check installer, etc. for breakage
Dan
diff
changeset
+ − 31
require_once('../includes/sql_parse.php');
494
+ − 32
require_once('includes/common.php');
+ − 33
require_once('includes/libenanoinstall.php');
377
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 34
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 35
// when the installer's common is loaded, it runs chdir() to the ENANO_ROOT, thus making this Enano's common.php
568
+ − 36
// PHP5 notice removed in 1.1.4 since the existing common is loaded and that loads lang and json2, which will
+ − 37
// give syntax errors on PHP4. So much for that. The installer will warn about this anyway.
354
979d99a0b00e
A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
Dan
parents:
diff
changeset
+ − 38
require_once('includes/common.php');
979d99a0b00e
A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
Dan
parents:
diff
changeset
+ − 39
@ini_set('display_errors', 'on');
979d99a0b00e
A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
Dan
parents:
diff
changeset
+ − 40
979d99a0b00e
A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
Dan
parents:
diff
changeset
+ − 41
$ui = new Enano_Installer_UI('Enano upgrader', false);
568
+ − 42
411
+ − 43
$stg_welcome = $ui->add_stage('Welcome', true);
+ − 44
$stg_confirm = $ui->add_stage('Confirmation', true);
+ − 45
$stg_upgrade = $ui->add_stage('Perform upgrade', true);
+ − 46
$stg_finish = $ui->add_stage('Finish', true);
354
979d99a0b00e
A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
Dan
parents:
diff
changeset
+ − 47
568
+ − 48
// init languages
+ − 49
$lang_id_list = array_keys($languages);
+ − 50
$lang_id = $lang_id_list[0];
+ − 51
$language_dir = $languages[$lang_id]['dir'];
+ − 52
+ − 53
// load the language file
+ − 54
$lang = new Language($lang_id);
+ − 55
$lang->load_file(ENANO_ROOT . '/language/' . $language_dir . '/install.json');
+ − 56
$lang->load_file(ENANO_ROOT . '/language/' . $language_dir . '/user.json');
354
979d99a0b00e
A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
Dan
parents:
diff
changeset
+ − 57
377
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 58
// Version check
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 59
if ( enano_version() == installer_enano_version() )
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 60
{
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 61
$ui->show_header();
627
+ − 62
$link_home = makeUrl(getConfig('main_page'), false, true);
+ − 63
echo '<h3>' . $lang->get('upgrade_err_current_title') . '</h3>' .
+ − 64
'<p>' . $lang->get('upgrade_err_current_body', array('mainpage_link' => $link_home)) . '</p>' .
+ − 65
'<p>' . $lang->get('upgrade_err_current_body_para2', array('mainpage_link' => $link_home)) . '</p>';
377
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 66
$ui->show_footer();
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 67
exit();
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 68
}
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 69
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 70
// Start session manager
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 71
$session->start();
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 72
if ( !$session->user_logged_in || ( $session->user_logged_in && $session->auth_level < USER_LEVEL_ADMIN ) )
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 73
{
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 74
if ( isset($_POST['do_login']) )
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 75
{
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 76
if ( !$session->user_logged_in )
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 77
{
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 78
$result = $session->login_without_crypto($_POST['username'], $_POST['password'], false, USER_LEVEL_MEMBER);
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 79
}
568
+ − 80
if ( !isset($result) || ( isset($result) && $result['success']) )
377
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 81
{
568
+ − 82
$result = $session->login_without_crypto($_POST['username'], $_POST['password'], false, USER_LEVEL_ADMIN);
+ − 83
if ( $result['success'] )
+ − 84
{
+ − 85
header('HTTP/1.1 302 Some kind of redirect with implied no content');
+ − 86
header('Location: ' . scriptPath . '/install/' . $session->append_sid('upgrade.php'));
+ − 87
exit();
+ − 88
}
377
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 89
}
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 90
}
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 91
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 92
$ui->show_header();
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 93
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 94
?>
568
+ − 95
<h3><?php echo $lang->get('upgrade_login_msg_auth_needed_title'); ?></h3>
377
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 96
<?php
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 97
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 98
echo '<form action="upgrade.php" method="post">';
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 99
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 100
if ( isset($result) )
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 101
{
568
+ − 102
echo '<b>' . $lang->get('upgrade_login_err_failed', array('error_code' => $result['error'])) . '</b>';
377
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 103
}
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 104
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 105
?>
568
+ − 106
<p><?php
+ − 107
if ( $session->user_logged_in )
+ − 108
{
+ − 109
echo $lang->get('upgrade_login_msg_auth_needed_body_level2');
+ − 110
}
+ − 111
else
+ − 112
{
+ − 113
echo $lang->get('upgrade_login_msg_auth_needed_body_level1');
+ − 114
}
+ − 115
?></p>
+ − 116
<table border="0" cellspacing="0" cellpadding="5" style="margin: 0 auto;">
+ − 117
<tr>
+ − 118
<td><?php echo $lang->get('user_login_field_username'); ?>:</td>
+ − 119
<td><input type="text" name="username" tabindex="1" /></td>
+ − 120
</tr>
+ − 121
<tr>
+ − 122
<td><?php echo $lang->get('user_login_field_password'); ?>:</td>
+ − 123
<td><input type="password" name="password" tabindex="2" /></td>
+ − 124
</tr>
+ − 125
<tr>
+ − 126
<td colspan="2" style="text-align: center;">
+ − 127
<input type="submit" name="do_login" value="<?php echo $lang->get('upgrade_login_btn_login'); ?>" tabindex="3" />
+ − 128
</td>
+ − 129
</tr>
+ − 130
</table>
377
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 131
<?php
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 132
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 133
echo '</form>';
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 134
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 135
$ui->show_footer();
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 136
exit();
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 137
}
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 138
411
+ − 139
if ( isset($_GET['stage']) && @$_GET['stage'] == 'pimpmyenano' )
+ − 140
{
+ − 141
$ui->set_visible_stage($stg_upgrade);
+ − 142
}
626
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 143
else if ( isset($_GET['stage']) && @$_GET['stage'] == 'postpimp' )
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 144
{
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 145
$ui->set_visible_stage($stg_finish);
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 146
}
411
+ − 147
else
+ − 148
{
+ − 149
$ui->set_visible_stage($stg_confirm);
+ − 150
}
+ − 151
377
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 152
// The real migration code
354
979d99a0b00e
A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
Dan
parents:
diff
changeset
+ − 153
$ui->show_header();
377
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 154
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 155
if ( isset($_GET['stage']) && @$_GET['stage'] == 'pimpmyenano' )
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 156
{
494
+ − 157
/*
+ − 158
HOW DOES ENANO'S UPGRADER WORK?
+ − 159
+ − 160
Versions of Enano are organized into branches and then specific versions by
+ − 161
version number. The upgrader works by using a list of known version numbers
+ − 162
and then systematically executing upgrade schemas for each version.
+ − 163
+ − 164
When the user requests an upgrade, the first thing performed is a migration
+ − 165
check, which verifies that they are within the right branch. If they are not
+ − 166
within the right branch the upgrade framework will load a migration script
+ − 167
which will define a function named MIGRATE(). Performing more than one
+ − 168
migration in one pass will probably never be supported. How that works for
+ − 169
UX in 1.3.x/1.4.x I know not yet.
+ − 170
+ − 171
After performing any necessary branch migrations, the framework will perform
+ − 172
any upgrades within the target branch, which is the first two parts
+ − 173
(delimited by periods) of the installer's version number defined in the
+ − 174
installer's common.php.
+ − 175
+ − 176
enano_perform_upgrade() will only do upgrades. Not migrations. The two as
+ − 177
illustrated within this installer are very different.
+ − 178
*/
+ − 179
411
+ − 180
// Do we need to run the migration first?
627
+ − 181
list($major_version, $minor_version) = explode('.', preg_replace('/^upg-/', '', enano_version()));
494
+ − 182
$current_branch = "$major_version.$minor_version";
+ − 183
+ − 184
list($major_version, $minor_version) = explode('.', installer_enano_version());
+ − 185
$target_branch = "$major_version.$minor_version";
+ − 186
+ − 187
if ( $target_branch != $current_branch )
377
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 188
{
494
+ − 189
// First upgrade to the latest revision of the current branch
+ − 190
enano_perform_upgrade($current_branch);
+ − 191
// Branch migration could be tricky and is often highly specific between
+ − 192
// major branches, so just include a custom migration script.
+ − 193
require(ENANO_ROOT . "/install/schemas/upgrade/migration/{$current_branch}-{$target_branch}.php");
411
+ − 194
$result = MIGRATE();
+ − 195
if ( !$result )
+ − 196
{
+ − 197
echo 'Migration failed, there should be an error message above.';
+ − 198
$ui->show_footer();
+ − 199
exit;
+ − 200
}
+ − 201
}
+ − 202
494
+ − 203
// Do the actual upgrade
+ − 204
enano_perform_upgrade($target_branch);
411
+ − 205
626
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 206
// Mark as upgrade-in-progress
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 207
setConfig('enano_version', 'upg-' . installer_enano_version());
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 208
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 209
?>
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 210
<h3>
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 211
<?php echo $lang->get('upgrade_msg_schema_complete_title'); ?>
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 212
</h3>
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 213
<p>
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 214
<?php echo $lang->get('upgrade_msg_schema_complete_body'); ?>
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 215
</p>
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 216
<form action="upgrade.php" method="get" style="text-align: center;">
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 217
<input type="hidden" name="auth" value="<?php echo $session->sid_super; ?>" />
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 218
<p style="text-align: center;">
627
+ − 219
<button name="stage" value="postpimp" class="submit">
+ − 220
<?php echo $lang->get('upgrade_btn_continue'); ?>
626
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 221
</button>
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 222
</p>
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 223
</form>
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 224
<?php
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 225
}
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 226
else if ( isset($_GET['stage']) && @$_GET['stage'] == 'postpimp' )
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 227
{
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 228
// verify version
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 229
if ( enano_version() != 'upg-' . installer_enano_version() )
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 230
{
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 231
echo '<p>' . $lang->get('upgrade_err_post_not_available') . '</p>';
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 232
$ui->show_footer();
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 233
$db->close();
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 234
exit();
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 235
}
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 236
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 237
function stg_load_files()
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 238
{
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 239
if ( !@include( ENANO_ROOT . "/install/includes/payload.php" ) )
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 240
return false;
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 241
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 242
return true;
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 243
}
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 244
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 245
echo '<h3>' . $lang->get('upgrade_post_status_title') . '</h3>';
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 246
echo '<p>' . $lang->get('upgrade_post_status_body') . '</p>';
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 247
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 248
start_install_table();
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 249
run_installer_stage('load', $lang->get('install_stg_load_title'), 'stg_load_files', $lang->get('install_stg_load_body'), false);
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 250
run_installer_stage('importlang', $lang->get('install_stg_importlang_title'), 'stg_lang_import', $lang->get('install_stg_importlang_body'));
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 251
run_installer_stage('flushcache', $lang->get('upgrade_stg_flushcache_title'), 'stg_flush_cache', $lang->get('upgrade_stg_flushcache_body'));
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 252
run_installer_stage('setversion', $lang->get('upgrade_stg_setversion_title'), 'stg_set_version', $lang->get('upgrade_stg_setversion_body'));
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 253
close_install_table();
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 254
627
+ − 255
// demote privileges
+ − 256
$session->logout(USER_LEVEL_ADMIN);
+ − 257
626
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 258
$link_home = makeUrl(getConfig('main_page'), false, true);
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 259
echo '<h3>' . $lang->get('upgrade_post_status_finish_title') . '</h3>';
be0e904eec17
Refined upgrade process a bit. Uses libenanoinstall (incomplete), and post stage added to flush caches and import new strings
Dan
diff
changeset
+ − 260
echo '<p>' . $lang->get('upgrade_post_status_finish_body', array('mainpage_link' => $link_home)) . '</p>';
377
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 261
}
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 262
else
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 263
{
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 264
?>
568
+ − 265
<h3><?php echo $lang->get('upgrade_confirm_title'); ?></h3>
+ − 266
<p><?php echo $lang->get('upgrade_confirm_body', array('enano_version' => installer_enano_version())); ?></p>
+ − 267
<ul>
+ − 268
<li><?php echo $lang->get('upgrade_confirm_objective_backup_fs', array('dir' => ENANO_ROOT)); ?></li>
+ − 269
<li><?php echo $lang->get('upgrade_confirm_objective_backup_db', array('dbname' => $dbname)); ?></li>
+ − 270
</ul>
+ − 271
<form method="get" action="upgrade.php" style="text-align: center;">
+ − 272
<input type="hidden" name="auth" value="<?php echo $session->sid_super; ?>" />
+ − 273
<button name="stage" value="pimpmyenano" class="submit">
+ − 274
<img src="images/icons/pimp.png" />
+ − 275
<?php echo $lang->get('upgrade_confirm_btn_upgrade'); ?>
+ − 276
</button>
+ − 277
</form>
377
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 278
<?php
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 279
}
bb3e6c3bd4f4
Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
diff
changeset
+ − 280
354
979d99a0b00e
A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
Dan
parents:
diff
changeset
+ − 281
$ui->show_footer();
979d99a0b00e
A few more installer tweaks / fixes. Initted upgrade script. Added migration schema from 1.0 to 1.1.
Dan
parents:
diff
changeset
+ − 282