install/upgrade.php
changeset 626 be0e904eec17
parent 568 3700f7124c2b
child 627 460e483987ab
equal deleted inserted replaced
625:0122f538c242 626:be0e904eec17
   135 
   135 
   136 if ( isset($_GET['stage']) && @$_GET['stage'] == 'pimpmyenano' )
   136 if ( isset($_GET['stage']) && @$_GET['stage'] == 'pimpmyenano' )
   137 {
   137 {
   138   $ui->set_visible_stage($stg_upgrade);
   138   $ui->set_visible_stage($stg_upgrade);
   139 }
   139 }
       
   140 else if ( isset($_GET['stage']) && @$_GET['stage'] == 'postpimp' )
       
   141 {
       
   142   $ui->set_visible_stage($stg_finish);
       
   143 }
   140 else
   144 else
   141 {
   145 {
   142   $ui->set_visible_stage($stg_confirm);
   146   $ui->set_visible_stage($stg_confirm);
   143 }
   147 }
   144 
   148 
   194   }
   198   }
   195   
   199   
   196   // Do the actual upgrade
   200   // Do the actual upgrade
   197   enano_perform_upgrade($target_branch);
   201   enano_perform_upgrade($target_branch);
   198   
   202   
   199   $site_url = makeUrl(getConfig('main_page'), false, true);
   203   // Mark as upgrade-in-progress
   200   echo '<p>All done! I\'ll actually be nice enough to give you a <a href="' . $site_url . '">link back to your site</a> this release <tt>:)</tt></p>';
   204   setConfig('enano_version', 'upg-' . installer_enano_version());
   201   echo '<p><b>It is important that you run a language string re-import and then clear your browser cache.</b> Otherwise you may see bits of the interface that appear to not be localized. This process will be automatic and non-destructive in later versions.</p>';
   205   
       
   206   ?>
       
   207   <h3>
       
   208     <?php echo $lang->get('upgrade_msg_schema_complete_title'); ?>
       
   209   </h3>
       
   210   <p>
       
   211     <?php echo $lang->get('upgrade_msg_schema_complete_body'); ?>
       
   212   </p>
       
   213   <form action="upgrade.php" method="get" style="text-align: center;">
       
   214     <input type="hidden" name="auth" value="<?php echo $session->sid_super; ?>" />
       
   215     <p style="text-align: center;">
       
   216       <button name="stage" value="postpimp">
       
   217         <?php echo $lang->get('etc_continue'); ?>
       
   218       </button>
       
   219     </p>
       
   220   </form>
       
   221   <?php
       
   222 }
       
   223 else if ( isset($_GET['stage']) && @$_GET['stage'] == 'postpimp' )
       
   224 {
       
   225   // verify version
       
   226   if ( enano_version() != 'upg-' . installer_enano_version() )
       
   227   {
       
   228     echo '<p>' . $lang->get('upgrade_err_post_not_available') . '</p>';
       
   229     $ui->show_footer();
       
   230     $db->close();
       
   231     exit();
       
   232   }
       
   233   
       
   234   function stg_load_files()
       
   235   {
       
   236     if ( !@include( ENANO_ROOT . "/install/includes/payload.php" ) )
       
   237       return false;
       
   238     
       
   239     return true;
       
   240   }
       
   241   
       
   242   echo '<h3>' . $lang->get('upgrade_post_status_title') . '</h3>';
       
   243   echo '<p>' . $lang->get('upgrade_post_status_body') . '</p>';
       
   244   
       
   245   start_install_table();
       
   246   run_installer_stage('load', $lang->get('install_stg_load_title'), 'stg_load_files', $lang->get('install_stg_load_body'), false);
       
   247   run_installer_stage('importlang', $lang->get('install_stg_importlang_title'), 'stg_lang_import', $lang->get('install_stg_importlang_body'));
       
   248   run_installer_stage('flushcache', $lang->get('upgrade_stg_flushcache_title'), 'stg_flush_cache', $lang->get('upgrade_stg_flushcache_body'));
       
   249   run_installer_stage('setversion', $lang->get('upgrade_stg_setversion_title'), 'stg_set_version', $lang->get('upgrade_stg_setversion_body'));
       
   250   close_install_table();
       
   251   
       
   252   $link_home = makeUrl(getConfig('main_page'), false, true);
       
   253   echo '<h3>' . $lang->get('upgrade_post_status_finish_title') . '</h3>';
       
   254   echo '<p>' . $lang->get('upgrade_post_status_finish_body', array('mainpage_link' => $link_home)) . '</p>';
   202 }
   255 }
   203 else
   256 else
   204 {
   257 {
   205   ?>
   258   ?>
   206   <h3><?php echo $lang->get('upgrade_confirm_title'); ?></h3>
   259   <h3><?php echo $lang->get('upgrade_confirm_title'); ?></h3>