Added Switch upgrade as a separate option

This commit is contained in:
Matthew Vale
2015-12-01 14:32:58 +00:00
parent 82a31894d5
commit d0d3240fc4
4 changed files with 106 additions and 0 deletions
+24
View File
@@ -35,6 +35,7 @@ if (
!permission_exists('upgrade_source') &&
!permission_exists('upgrade_schema') &&
!permission_exists('upgrade_apps') &&
!permission_exists('upgrade_switch') &&
!permission_exists('menu_restore') &&
!permission_exists('group_edit')
) {
@@ -121,6 +122,13 @@ if (sizeof($_POST) > 0) {
$response_message = "Permission Defaults Restored";
}
// upgrade switch
if ($do["switch"] && permission_exists("upgrade_switch")) {
$included = true;
require_once("core/install/upgrade_switch.php");
$response_message = "Switch Upgraded";
}
if (sizeof($_POST['do']) > 1) {
$response_message = $text['message-upgrade'];
}
@@ -250,6 +258,22 @@ if (permission_exists("group_edit")) {
echo "</table>\n";
}
if (permission_exists("upgrade_switch")) {
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
echo "<tr>\n";
echo " <td width='30%' class='vncell'>\n";
echo " ".$text['label-upgrade_switch'];
echo " </td>\n";
echo " <td width='70%' class='vtable' style='height: 50px;'>\n";
echo " <label for='do_switch'>";
echo " <input type='checkbox' class='formfld' name='do[switch]' id='do_switch' value='1'>";
echo " ".$text['description-upgrade_switch'];
echo " </label>\n";
echo " </td>\n";
echo "</tr>\n";
echo "</table>\n";
}
echo "<br>";
echo "<div style='text-align: right;'><input type='submit' class='btn' value='".$text['button-upgrade_execute']."'></div>";
echo "<br><br>";