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
+3
View File
@@ -32,6 +32,9 @@
$apps[$x]['permissions'][$y]['menu']['uuid'] = "e7bb1296-3141-48c9-a95a-82d2768d0ae4";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
$apps[$x]['permissions'][$y]['name'] = "upgrade_switch";
$apps[$x]['permissions'][$y]['groups'][] = "superadmin";
$y++;
//schema details
$y = 0; //table array index
+20
View File
@@ -180,6 +180,16 @@ $text['label-upgrade_apps']['sv-se'] = "App Standard";
$text['label-upgrade_apps']['uk'] = "Типові значення додатків";
$text['label-upgrade_apps']['de-at'] = "Applikationen zurücksetzen";
$text['label-upgrade_switch']['en-us'] = "Switch Upgrade";
$text['label-upgrade_switch']['es-cl'] = "";
$text['label-upgrade_switch']['pt-pt'] = "";
$text['label-upgrade_switch']['fr-fr'] = "";
$text['label-upgrade_switch']['pt-br'] = "";
$text['label-upgrade_switch']['pl'] = "";
$text['label-upgrade_switch']['sv-se'] = "";
$text['label-upgrade_switch']['uk'] = "";
$text['label-upgrade_switch']['de-at'] = "";
$text['label-upgrade']['en-us'] = "Upgrade";
$text['label-upgrade']['es-cl'] = "Actualizar";
$text['label-upgrade']['pt-pt'] = "Actualizar";
@@ -390,6 +400,16 @@ $text['description-upgrade_apps']['sv-se'] = "Återställer standardinställning
$text['description-upgrade_apps']['uk'] = "Встановлює типові значення для додатків";
$text['description-upgrade_apps']['de-at'] = "Setzt alle Applikationen auf die Standardeinstellungen zurück.";
$text['description-upgrade_switch']['en-us'] = "Runs the upgrade switch routine.";
$text['description-upgrade_switch']['es-cl'] = "";
$text['description-upgrade_switch']['pt-pt'] = "";
$text['description-upgrade_switch']['fr-fr'] = "";
$text['description-upgrade_switch']['pt-br'] = "";
$text['description-upgrade_switch']['pl'] = "";
$text['description-upgrade_switch']['sv-se'] = "";
$text['description-upgrade_switch']['uk'] = "";
$text['description-upgrade_switch']['de-at'] = "";
$text['description-upgrade']['en-us'] = "Select the actions below you wish to perform.";
$text['description-upgrade']['es-cl'] = "Seleccione las acciones a continuación que desea realizar.";
$text['description-upgrade']['pt-pt'] = "Selecione as ações abaixo você deseja executar.";
+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>";