mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
Merge remote-tracking branch 'origin/support/2.6' into support/2.7
# Conflicts: # pages/ajax.render.php # setup/wizardsteps.class.inc.php
This commit is contained in:
@@ -141,7 +141,7 @@ header("Expires: Fri, 17 Jul 1970 05:00:00 GMT"); // Date in the past
|
||||
$sOperation = Utils::ReadParam('operation', '');
|
||||
try
|
||||
{
|
||||
SetupUtils::CheckSetupToken();
|
||||
SetupUtils::CheckSetupToken(true);
|
||||
|
||||
switch($sOperation)
|
||||
{
|
||||
|
||||
@@ -2540,11 +2540,13 @@ class WizStepDone extends WizardStep
|
||||
$oPage->ok("The installation completed successfully.");
|
||||
}
|
||||
|
||||
$bHasBackup = false;
|
||||
if (($this->oWizard->GetParameter('mode', '') == 'upgrade') && $this->oWizard->GetParameter('db_backup', false) && $this->oWizard->GetParameter('authent', false))
|
||||
{
|
||||
$sBackupDestination = $this->oWizard->GetParameter('db_backup_path', '');
|
||||
if (file_exists($sBackupDestination.'.tar.gz'))
|
||||
{
|
||||
$bHasBackup = true;
|
||||
// To mitigate security risks: pass only the filename without the extension, the download will add the extension itself
|
||||
$oPage->p('Your backup is ready');
|
||||
$oPage->p('<a style="background:transparent;" href="'.utils::GetAbsoluteUrlAppRoot(true).'setup/ajax.dataloader.php?operation=async_action&step_class=WizStepDone¶ms[backup]='.urlencode($sBackupDestination).'&authent='.$this->oWizard->GetParameter('authent','').'" target="_blank"><img src="../images/tar.png" style="border:0;vertical-align:middle;"> Download '.basename($sBackupDestination).'</a>');
|
||||
@@ -2665,10 +2667,14 @@ class WizStepDone extends WizardStep
|
||||
$oPage->add('<img style="border:0" src="'.$sImgUrl.'"/>');
|
||||
$sForm = addslashes($sForm);
|
||||
$oPage->add_ready_script("$('#wiz_form').after('$sForm');");
|
||||
|
||||
// avoid leaving in a dirty state
|
||||
SetupUtils::ExitMaintenanceMode(false);
|
||||
SetupUtils::ExitReadOnlyMode(false);
|
||||
SetupUtils::EraseSetupToken();
|
||||
|
||||
if (false === $bHasBackup) {
|
||||
SetupUtils::EraseSetupToken();
|
||||
}
|
||||
}
|
||||
|
||||
public function CanMoveForward()
|
||||
|
||||
Reference in New Issue
Block a user