Changeset 2268

Show
Ignore:
Timestamp:
11/29/10 11:15:16 (18 months ago)
Author:
nick_ramsay
Message:

[1.5] Reduced upgrade script to two steps, fixing ticket #178 ("delete install folder" notice one step too early). Added constant definitions for SITEURL to fix undefined errors.

Location:
branches/1.5/install
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • branches/1.5/install/index.php

    r2267 r2268  
    4242} 
    4343 
     44if (!defined("SITEURL")) { define("SITEURL", BASEURL); } 
     45 
    4446// define path constants 
    4547$path_constants = array( 
     
    811813 
    812814/** 
    813  * Step 3 of upgrade - shows completion. 
    814  */ 
    815 function upgrade_plugins() 
    816 { 
    817         global $lang; 
    818         global $cage; 
    819         $h = new Hotaru(); 
    820         echo html_header(); 
    821  
    822         // Step title 
    823         echo "<h2>" . $lang['upgrade_step3'] . "</h2>\n"; 
    824  
    825         echo "<br/><div class='install_content'>" . $lang['upgrade_step3_details'] . "<br/><br/>\n"; 
    826  
    827         //send feedback report 
    828         $systeminfo = new SystemInfo(); 
    829         $systeminfo->hotaru_feedback($h); 
    830  
    831         echo "<br/>" . $lang['upgrade_step3_instructions'] . "<br/><br/>\n"; 
    832          
    833         echo "<br/>" . $lang['upgrade_step3_go_play'] . "</div><br/><br/>\n"; 
    834  
    835         // Previous/Next buttons 
    836         echo "<div class='back button''><a href='index.php?step=2&action=upgrade'>" . $lang['install_back'] . "</a></div>\n"; 
    837         echo "<div class='next button''><a href='" . BASEURL . "admin_index.php'>" . $lang['upgrade_home'] . "</a></div>\n"; 
    838  
    839         echo html_footer(); 
    840 } 
    841  
    842 /** 
    843815 * create new settings file 
    844816 */ 
  • branches/1.5/install/install-upgrade.php

    r2243 r2268  
    2929 */ 
    3030 
     31if (!defined("SITEURL")) { define("SITEURL", BASEURL); } 
    3132 
    3233$h = new Hotaru(); // must come before language inclusion 
     
    103104{ 
    104105        global $lang; 
    105         global $cage; 
    106         $delete = $cage->post->getAlpha('delete');        // delete install folder. 
    107         $folder_deleted = 0; 
    108  
    109         if ($delete) { 
    110             // try to delete the folder 
    111             //$folder_deleted = delTree('install');         
    112             $folder_deleted = 2; 
    113             // if was deleted then redirect to baseurl 
    114             if ($folder_deleted == 1) header("Location: /index.php" ); 
    115         } 
    116106 
    117107        echo html_header(); 
     
    121111 
    122112        // Step content 
    123         if ($folder_deleted == 0) echo "<div class='install_content'>" . $lang['install_step4_installation_complete'] . "</div>\n"; 
     113        echo "<div class='install_content'>" . $lang['install_step4_installation_complete'] . "</div>\n"; 
    124114        echo "<div class='install_content'>" . $lang['install_step4_installation_delete'] . "</div>\n"; 
    125  
    126         if ($folder_deleted == 0) { 
    127             // Confirm delete and continue install 
    128 //          echo "<div class='install_content'>" . $lang['install_step4_installation_delete_folder'] . "</div>\n"; 
    129 //          echo "<form name='install_admin_reg_form' action='index.php?step=2&action=upgrade' method='post'>\n"; 
    130 //          echo "<input type='hidden' name='csrf' value='" . $h->csrfToken . "' />"; 
    131 //          echo "<input type='hidden' name='delete' value='folder' />"; 
    132 //          echo "<input type='hidden' name='step' value='2' />"; 
    133 // 
    134 //          echo "<input class='update button' type='submit' value='" . $lang['install_step4_form_delete_folder'] . "' />"; 
    135 //          echo "</div></form>\n"; 
    136         } else { 
    137             echo "<br/><img src='../content/admin_themes/admin_default/images/delete.png' style='float:left; margin-left:12px;'>"; 
    138             echo "<div class='install_content'><span style='color: red;'>" . $lang['install_step1_warning'] . "</span>: " . $lang['install_step4_installation_delete_failed'] . "</div>\n"; 
    139         }        
    140115 
    141116        // Previous/Next buttons 
    142117        echo "<div class='back button''><a href='index.php?step=1&action=upgrade'>" . $lang['install_back'] . "</a></div>\n"; 
    143         echo "<div class='next button''><a href='index.php?step=3&action=upgrade'>" . $lang['install_next'] . "</a></div>\n"; 
     118        echo "<div class='next button''><a href='" . BASEURL . "admin_index.php'>" . $lang['upgrade_home'] . "</a></div>\n"; 
    144119         
    145120        echo html_footer();     
  • branches/1.5/install/install_language.php

    r2243 r2268  
    2727$lang["upgrade_title"] = "Hotaru CMS Upgrade"; 
    2828 
    29 $lang["upgrade_step1"] = "Step 1/3: Checking your existing setup"; 
     29$lang["upgrade_step1"] = "Step 1/2: Checking your existing setup"; 
    3030$lang["upgrade_step1_details"] = "To upgrade Hotaru to version " . $h->version . ", click 'Next'..."; 
    3131$lang["upgrade_step1_old_version"] = "You are currently running Hotaru CMS version "; 
     
    3434 
    3535/* Upgrade Step 2 */ 
    36 $lang["upgrade_step2"] = "Step 2/3: Upgrade Complete"; 
     36$lang["upgrade_step2"] = "Step 2/2: Upgrade Complete"; 
    3737$lang["upgrade_step2_details"] = "Congratulations! You have successfully upgraded Hotaru CMS."; 
    38  
    39 /* Upgrade Step 2 */ 
    40 $lang["upgrade_step3"] = "Step 3/3: Check Plugins, Templates"; 
    41 $lang["upgrade_step3_details"] = "You have successfully upgraded Hotaru CMS."; 
    42 $lang["upgrade_step3_instructions"] = "After clicking \"Finish\" you may find some of your plugins need upgrading. You can check the latest version numbers from the Plugin Management page in your admin dashboard. You may also need to modify any templates you have customised to make sure they work with the latest version of Hotaru CMS."; 
    43 $lang["upgrade_step3_go_play"] = "Click \"Finish\" to access your Hotaru site!"; 
    4438$lang["upgrade_home"] = "Finish"; 
    4539