install/upgrade.php
changeset 832 7152ca0a0ce9
parent 802 59cce2313f9d
child 934 ebefca69f3fd
equal deleted inserted replaced
831:45e887f23282 832:7152ca0a0ce9
    19 // The list of versions in THIS AND PREVIOUS branches, in chronological order.
    19 // The list of versions in THIS AND PREVIOUS branches, in chronological order.
    20 $enano_versions = array();
    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', '1.0.5');
    21 $enano_versions['1.0'] = array('1.0', '1.0.1', '1.0.2b1', '1.0.2', '1.0.3', '1.0.4', '1.0.5');
    22 $enano_versions['1.1'] = array('1.1.1', '1.1.2', '1.1.3', '1.1.4', '1.1.5', '1.1.6');
    22 $enano_versions['1.1'] = array('1.1.1', '1.1.2', '1.1.3', '1.1.4', '1.1.5', '1.1.6');
    23 
    23 
       
    24 // If true, this will do a full langimport instead of only adding new strings.
       
    25 // Will probably be left on, but some change probably needs to be made to mark
       
    26 // strings as customized in the DB.
       
    27 $do_langimport = true;
       
    28 
    24 // Turn on every imaginable API hack to make common load on older databases
    29 // Turn on every imaginable API hack to make common load on older databases
    25 define('IN_ENANO_UPGRADE', 1);
    30 define('IN_ENANO_UPGRADE', 1);
    26 define('IN_ENANO_MIGRATION', 1);
    31 define('IN_ENANO_MIGRATION', 1);
    27 define('ENANO_ALLOW_LOAD_NOLANG', 1);
    32 define('ENANO_ALLOW_LOAD_NOLANG', 1);
    28 @ini_set('display_errors', 'on');
    33 @ini_set('display_errors', 'on');
    36 // PHP5 notice removed in 1.1.4 since the existing common is loaded and that loads lang and json2, which will
    41 // 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.
    42 // give syntax errors on PHP4. So much for that. The installer will warn about this anyway.
    38 require_once('includes/common.php');
    43 require_once('includes/common.php');
    39 @ini_set('display_errors', 'on');
    44 @ini_set('display_errors', 'on');
    40 
    45 
    41 define('ENANO_UPGRADE_USE_AES_PASSWORDS', in_array(enano_version(), array('1.0RC1', '1.0RC2', '1.0RC3', '1.0', '1.0.1', '1.0.2', '1.0.3', '1.0.4', '1.0.5', '1.1.1', '1.1.2', '1.1.3', '1.1.4', '1.1.5')));
    46 if ( in_array(enano_version(), array('1.0RC1', '1.0RC2', '1.0RC3', '1.0', '1.0.1', '1.0.2', '1.0.3', '1.0.4', '1.0.5', '1.1.1', '1.1.2', '1.1.3', '1.1.4', '1.1.5')) )
       
    47   define('ENANO_UPGRADE_USE_AES_PASSWORDS', 1);
    42 
    48 
    43 $ui = new Enano_Installer_UI('Enano upgrader', false);
    49 $ui = new Enano_Installer_UI('Enano upgrader', false);
    44 
    50 
    45 $stg_welcome = $ui->add_stage('Welcome', true);
    51 $stg_welcome = $ui->add_stage('Welcome', true);
    46 $stg_confirm = $ui->add_stage('Confirmation', true);
    52 $stg_confirm = $ui->add_stage('Confirmation', true);
   268   <p><?php echo $lang->get('upgrade_confirm_body', array('enano_version' => installer_enano_version())); ?></p>
   274   <p><?php echo $lang->get('upgrade_confirm_body', array('enano_version' => installer_enano_version())); ?></p>
   269   <ul>
   275   <ul>
   270     <li><?php echo $lang->get('upgrade_confirm_objective_backup_fs', array('dir' => ENANO_ROOT)); ?></li>
   276     <li><?php echo $lang->get('upgrade_confirm_objective_backup_fs', array('dir' => ENANO_ROOT)); ?></li>
   271     <li><?php echo $lang->get('upgrade_confirm_objective_backup_db', array('dbname' => $dbname)); ?></li>
   277     <li><?php echo $lang->get('upgrade_confirm_objective_backup_db', array('dbname' => $dbname)); ?></li>
   272   </ul>
   278   </ul>
       
   279   <?php
       
   280   if ( $do_langimport ):
       
   281   ?>
       
   282   <div class="warning-box">
       
   283     <?php echo $lang->get('upgrade_confirm_warning_langimport'); ?>
       
   284   </div>
       
   285   <?php
       
   286   endif;
       
   287   ?>
   273   <form method="get" action="upgrade.php" style="text-align: center;">
   288   <form method="get" action="upgrade.php" style="text-align: center;">
   274     <input type="hidden" name="auth" value="<?php echo $session->sid_super; ?>" />
   289     <input type="hidden" name="auth" value="<?php echo $session->sid_super; ?>" />
   275     <button name="stage" value="pimpmyenano" class="submit">
   290     <button name="stage" value="pimpmyenano" class="submit">
   276       <img src="images/icons/pimp.png" />
   291       <img src="images/icons/pimp.png" />
   277       <?php echo $lang->get('upgrade_confirm_btn_upgrade'); ?>
   292       <?php echo $lang->get('upgrade_confirm_btn_upgrade'); ?>