Changeset 9059
- Timestamp:
- 03/01/10 15:55:27 (3 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.6/versionupgrade/functions.inc.php
r8874 r9059 4 4 * 5 5 */ 6 7 // Change the version numbers and text and publish 8 $alpha_version = "2.7.0alpha0"; 9 $beta1_version = "2.7.0beta1"; 10 $beta1_0_version = "2.7.0beta1.0"; 11 $upgrade_ver = "2.7"; 12 $upgrade_final = "2.7.0 Final"; 6 13 7 14 function versionupgrade_setversion($version) { … … 23 30 function versionupgrade_configprocess() { 24 31 global $db; 32 global $alpha_version; 33 global $beta1_version; 34 global $beta1_0_version; 25 35 26 36 $moduleinfo = module_getinfo('core'); 27 37 $mainversion = getversion(); 28 38 29 if (version_compare_freepbx($mainversion, "2.7.0alpha0","ge") && version_compare_freepbx($moduleinfo['core']['version'], "2.7.0alpha0", "lt")) {39 if (version_compare_freepbx($mainversion,$alpha_version,"ge") && version_compare_freepbx($moduleinfo['core']['version'], $alpha_version, "lt")) { 30 40 $sql = "UPDATE admin SET value = 'false' WHERE variable = 'need_reload'"; 31 41 $result = $db->query($sql); … … 33 43 //can't do much? 34 44 } 35 } else if (version_compare_freepbx($mainversion, "2.7.0beta1","ge") && version_compare_freepbx($moduleinfo['core']['version'], "2.7.0beta1.0", "ge")) {45 } else if (version_compare_freepbx($mainversion,$beta1_version,"ge") && version_compare_freepbx($moduleinfo['core']['version'], $beta1_0_version, "ge")) { 36 46 $results = module_delete('versionupgrade'); 37 47 } modules/branches/2.6/versionupgrade/page.versionupgrade.php
r9050 r9059 27 27 $core_version = $core_xml['core']['version']; 28 28 29 if (version_compare_freepbx($version, "2.7.0alpha0","lt") && $upgraderequest == "UPGRADE") { 30 versionupgrade_setversion("2.7.0alpha0"); 29 // These are from functions.inc.php, set all versions there 30 global $alpha_version; 31 global $upgrade_ver; 32 global $upgrade_final; 33 global $beta_version; 34 35 if (version_compare_freepbx($version, $alpha_version,"lt") && $upgraderequest == "UPGRADE") { 36 versionupgrade_setversion($alpha_version); 31 37 $version = getversion(); 32 38 } 33 39 34 echo "<h2>". _("2.7 Upgrade Module")."</h2>";40 echo "<h2>".sprintf(_("%s Upgrade Module"),$upgrade_ver)."</h2>"; 35 41 echo "<p><b>"._("Current Version Info (Updated each stage of upgrade process):")."</b></p>"; 36 42 ?> … … 62 68 </table> 63 69 <?php 64 65 if (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.0 Final</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); 70 if (version_compare_freepbx($version, $alpha_version,"lt")) { 71 echo sprintf(_("<h2 align='center' style='color:red'>WARNING - YOU WILL BE UPGRADED TO VERSION %s</h2><p>This module will allow you to upgrade to FreePBX version %s 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 %s.</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 %s version and you may disable or remove this module if it does not do so automatically.</p>"),$upgrade_final,$upgrade_ver,$version,$upgrade_ver,$upgrade_ver); 67 72 ?> 68 73 … … 89 94 var theForm = document.upgrade; 90 95 function upgrade_onsubmit() { 91 var msgConfirmUpgrade = "<?php echo _("You are about to upgrade your system to FreePBX 2.7.0 Final. You can not reverse this process. Do you want to continue?"); ?>";96 var msgConfirmUpgrade = "<?php echo sprintf(_("You are about to upgrade your system to FreePBX %s. You can not reverse this process. Do you want to continue?"),$upgrade_final); ?>"; 92 97 93 98 if (!confirm(msgConfirmUpgrade)) { … … 100 105 101 106 <?php 102 } else if (version_compare_freepbx($version, "2.7.0beta1","lt")) {107 } else if (version_compare_freepbx($version, $beta_version,"lt")) { 103 108 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);109 echo "<br />".sprintf(_("<p>You appear to have partially upgraded to version %s, 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 %s version and you may disable or remove this module if it it does not do so automatically.</p>"),$upgrade_ver,$version,$upgrade_ver); 105 110 106 } else if (version_compare_freepbx($core_version, "2.7.0alpha0", "lt")) {111 } else if (version_compare_freepbx($core_version, $alpha_version, "lt")) { 107 112 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);113 echo "<br />".sprintf(_("<p>You appear to have upgraded Framework to version %s, 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 %s version and you may disable or remove this module if it it does not do so automatically.</p>"),$upgrade_ver,$version,$upgrade_ver); 109 114 110 115 } else {
