Changeset 8874

Show
Ignore:
Timestamp:
02/17/10 20:40:11 (3 years ago)
Author:
p_lindheimer
Message:

add 2.6 to 2.7 upgrade module

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.6/versionupgrade/functions.inc.php

    r8210 r8874  
    2727  $mainversion = getversion(); 
    2828 
    29   if (version_compare_freepbx($mainversion,"2.6.0alpha0","ge") && version_compare_freepbx($moduleinfo['core']['version'], "2.6.0alpha0", "lt")) { 
     29  if (version_compare_freepbx($mainversion,"2.7.0alpha0","ge") && version_compare_freepbx($moduleinfo['core']['version'], "2.7.0alpha0", "lt")) { 
    3030    $sql = "UPDATE admin SET value = 'false' WHERE variable = 'need_reload'";  
    3131    $result = $db->query($sql); 
     
    3333      //can't do much? 
    3434    } 
    35   } else if (version_compare_freepbx($mainversion,"2.6.0beta1","ge") && version_compare_freepbx($moduleinfo['core']['version'], "2.6.0beta1.0", "ge")) { 
     35  } else if (version_compare_freepbx($mainversion,"2.7.0beta1","ge") && version_compare_freepbx($moduleinfo['core']['version'], "2.7.0beta1.0", "ge")) { 
    3636    $results = module_delete('versionupgrade'); 
    3737  } 
  • modules/branches/2.6/versionupgrade/module.xml

    r8796 r8874  
    11<module> 
    22  <rawname>versionupgrade</rawname> 
    3   <name>2.6 Upgrade Tool</name> 
    4   <version>2.5.0.2</version> 
     3  <name>2.7 Upgrade Tool</name> 
     4  <version>2.6.0.0</version> 
    55  <changelog> 
    6     *2.5.0.2* change description to not refer to beta 
    7     *2.5.0.1* spelling error, Swedish translations 
    8     *2.5.0.0* Modify for 2.5 to 2.6 upgrade tool to beta2 
    9     *2.4.0.2* Upgraded text to reflect final release 
    10     *2.4.0.1* Upgraded text to reflect upgrade to Release Candidate (was beta) 
    11     *2.4.0.0* Modify for 2.4 to 2.5 upgrade tool to beta1 
    12     *2.3.0.1* delete the current xml file so the 2.3 version is not cached 
    13     *2.3.0* Upgrade module to upgrade from 2.3 to 2.4 
     6    *2.6.0.0* 2.7 RC1 Upgrade Tool 
    147  </changelog> 
    158  <description> 
    16     This module allows a 2.5 system to be upgraded to version 2.6. It provides a button that will bump up the major version number to 2.6.0alpha0 which has the effect of directing Module Admin to use the 2.6 repository. Doing such will then allow the user to upgrade all require modules and framework to enable 2.6. Installing the module is safe and will provide more details about how to upgrade. You will have ample opportunity to decide if you want to do the upgrade after installation. 
     9    This module allows a 2.6 system to be upgraded to version 2.7 Release Candidate. It provides a button that will bump up the major version number to 2.7.0alpha0 which has the effect of directing Module Admin to use the 2.7 repository. Doing such will then allow the user to upgrade all require modules and framework to enable 2.7. Installing the module is safe and will provide more details about how to upgrade. You will have ample opportunity to decide if you want to do the upgrade after installation. 
    1710  </description> 
    1811  <type>tool</type> 
    1912  <menuitems> 
    20     <versionupgrade1 display="versionupgrade" type="tool" category="Admin" sort="10">2.6 Upgrade Tool</versionupgrade1> 
    21     <versionupgrade2 display="versionupgrade" type="setup" category="Admin" sort="10">2.6 Upgrade Tool</versionupgrade2> 
     13    <versionupgrade1 display="versionupgrade" type="tool" category="Admin" sort="10">2.7 Upgrade Tool</versionupgrade1> 
     14    <versionupgrade2 display="versionupgrade" type="setup" category="Admin" sort="10">2.7 Upgrade Tool</versionupgrade2> 
    2215  </menuitems> 
    2316  <depends> 
    24     <version>lt 2.6.0alpha1</version> 
     17    <version>lt 2.7.0alpha1</version> 
    2518  </depends> 
    2619  <category>Basic</category> 
  • modules/branches/2.6/versionupgrade/page.versionupgrade.php

    r8224 r8874  
    2727$core_version = $core_xml['core']['version']; 
    2828 
    29 if (version_compare_freepbx($version, "2.6.0alpha0","lt") && $upgraderequest == "UPGRADE") { 
    30   versionupgrade_setversion("2.6.0alpha0"); 
     29if (version_compare_freepbx($version, "2.7.0alpha0","lt") && $upgraderequest == "UPGRADE") { 
     30  versionupgrade_setversion("2.7.0alpha0"); 
    3131  $version = getversion(); 
    3232} 
    3333 
    34 echo "<h2>"._("2.6 Upgrade Module")."</h2>"; 
     34echo "<h2>"._("2.7 Upgrade Module")."</h2>"; 
    3535echo "<p><b>"._("Current Version Info (Updated each stage of upgrade process):")."</b></p>"; 
    3636?> 
     
    6363<?php 
    6464 
    65 if (version_compare_freepbx($version, "2.6.0alpha0","lt")) { 
    66   echo sprintf(_("<h2 align='center' style='color:red'>WARNING - YOU WILL BE UPGRADED TO VERSION 2.6</h2><p>This module will allow you to upgrade to FreePBX version 2.6 from the current version, %s, that you are running.</p><p>The upgrade process is a simple but multi-step process that you should complete all at one time. As always when upgrading a system, it is advisable that you complete this process when the system is not actively being used.</p>The steps you will take are:<ol><li>Press the upgrade button below.</li><li>Go to Module Admin, check for online updates, and upgrade the <b>FreePBX Framework</b> module ONLY from the online repository which will now be connected to version 2.6.</li><li>Now, Check for online updates again and upgrade all other modules that have upgrades available. If you get dependency warnings, just repeat the process until all your modules have been upgraded.</li><li>Now press the Apply Configuration bar.</li></ol><p>Once you have completed these step you will be upgraded to the new 2.6 version and you may disable or remove this module if it does not do so automatically.</p>"),$version); 
     65if (version_compare_freepbx($version, "2.7.0alpha0","lt")) { 
     66  echo sprintf(_("<h2 align='center' style='color:red'>WARNING - YOU WILL BE UPGRADED TO VERSION 2.7 Release Candidate</h2><p>This module will allow you to upgrade to FreePBX version 2.7 from the current version, %s, that you are running.</p><p>The upgrade process is a simple but multi-step process that you should complete all at one time. As always when upgrading a system, it is advisable that you complete this process when the system is not actively being used.</p>The steps you will take are:<ol><li>Press the upgrade button below.</li><li>Go to Module Admin, check for online updates, and upgrade the <b>FreePBX Framework</b> module ONLY from the online repository which will now be connected to version 2.7.</li><li>Now, Check for online updates again and upgrade all other modules that have upgrades available. If you get dependency warnings, just repeat the process until all your modules have been upgraded.</li><li>Now press the Apply Configuration bar.</li></ol><p>Once you have completed these step you will be upgraded to the new 2.7 version and you may disable or remove this module if it does not do so automatically.</p>"),$version); 
    6767?> 
    6868 
     
    8989  var theForm = document.upgrade; 
    9090  function upgrade_onsubmit() { 
    91     var msgConfirmUpgrade = "<?php echo _("You are about to upgrade your system to FreePBX 2.6. You can not reverse this process. Do you want to continue?"); ?>"; 
     91    var msgConfirmUpgrade = "<?php echo _("You are about to upgrade your system to FreePBX 2.7 Release Candidate. You can not reverse this process. Do you want to continue?"); ?>"; 
    9292   
    9393    if (!confirm(msgConfirmUpgrade)) { 
     
    100100 
    101101<?php 
    102 } else if (version_compare_freepbx($version, "2.6.0beta1","lt")) { 
     102} else if (version_compare_freepbx($version, "2.7.0beta1","lt")) { 
    103103 
    104   echo "<br />".sprintf(_("<p>You appear to have partially upgraded to version 2.6, your current version number is %s. The remaining steps you should take are:</p><ol><li>Go to Module Admin, press check for online updates, and upgrade the <b>FreePBX Framework</b> module from the online repository. Do not upgrade other modules.</li><li>Check for online updates again and upgrade all other modules that have upgrades available. If you get dependency warnings, simply repeat the process until all modules are upgraded.</li><li>Press the Apply Configuration Changes bar.</li></ol><p>Once you have completed these steps you will be upgraded to the new 2.6 version and you may disable or remove this module if it it does not do so automatically.</p>"),$version); 
     104  echo "<br />".sprintf(_("<p>You appear to have partially upgraded to version 2.7, your current version number is %s. The remaining steps you should take are:</p><ol><li>Go to Module Admin, press check for online updates, and upgrade the <b>FreePBX Framework</b> module from the online repository. Do not upgrade other modules.</li><li>Check for online updates again and upgrade all other modules that have upgrades available. If you get dependency warnings, simply repeat the process until all modules are upgraded.</li><li>Press the Apply Configuration Changes bar.</li></ol><p>Once you have completed these steps you will be upgraded to the new 2.7 version and you may disable or remove this module if it it does not do so automatically.</p>"),$version); 
    105105 
    106 } else if (version_compare_freepbx($core_version, "2.6.0alpha0", "lt")) { 
     106} else if (version_compare_freepbx($core_version, "2.7.0alpha0", "lt")) { 
    107107 
    108   echo "<br />".sprintf(_("<p>You appear to have upgraded Framework to version 2.6, your current version number is %s. You still need to upgrade the Core Module and any other modules that show upgrades available. The remaining steps you should take are:</p><ol><li>Check for online updates again and upgrade all other modules that have upgrades available including Core. If you get dependency warnings simply repeat the process until all modules are upgraded.</li><li>Press the Apply Configuration Changes bar.</li></ol><p>Once you have completed these steps you will be upgraded to the new 2.6 version and you may disable or remove this module if it it does not do so automatically.</p>"),$version); 
     108  echo "<br />".sprintf(_("<p>You appear to have upgraded Framework to version 2.7, your current version number is %s. You still need to upgrade the Core Module and any other modules that show upgrades available. The remaining steps you should take are:</p><ol><li>Check for online updates again and upgrade all other modules that have upgrades available including Core. If you get dependency warnings simply repeat the process until all modules are upgraded.</li><li>Press the Apply Configuration Changes bar.</li></ol><p>Once you have completed these steps you will be upgraded to the new 2.7 version and you may disable or remove this module if it it does not do so automatically.</p>"),$version); 
    109109 
    110110} else {