mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 15:22:17 +02:00
N°2989 ajax.backup small updates
* update copyright * in messages replace iTop by constant
This commit is contained in:
@@ -1,26 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
// Copyright (C) 2013-2017 Combodo SARL
|
|
||||||
//
|
|
||||||
// This file is part of iTop.
|
|
||||||
//
|
|
||||||
// iTop is free software; you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU Affero General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// iTop is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU Affero General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
|
||||||
// along with iTop. If not, see <http://www.gnu.org/licenses/>
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Backup from an interactive session
|
* Copyright (C) 2010-2020 Combodo SARL
|
||||||
*
|
*
|
||||||
* @copyright Copyright (C) 2013-2017 Combodo SARL
|
* This file is part of iTop.
|
||||||
* @license http://opensource.org/licenses/AGPL-3.0
|
*
|
||||||
|
* iTop is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* iTop is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('__DIR__')) define('__DIR__', dirname(__FILE__));
|
if (!defined('__DIR__')) define('__DIR__', dirname(__FILE__));
|
||||||
@@ -50,7 +44,9 @@ function DisplayErrorAndDie($oPage, $sHtmlErrorMessage, $exitCode = null)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Backup from an interactive session
|
||||||
|
*/
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$sOperation = utils::ReadParam('operation', '');
|
$sOperation = utils::ReadParam('operation', '');
|
||||||
@@ -68,7 +64,7 @@ try
|
|||||||
|
|
||||||
if (utils::GetConfig()->Get('demo_mode'))
|
if (utils::GetConfig()->Get('demo_mode'))
|
||||||
{
|
{
|
||||||
DisplayErrorAndDie($oPage, '<div data-error-stimulus="Error">Sorry, iTop is in <b>demonstration mode</b>: the feature is disabled.</div>');
|
DisplayErrorAndDie($oPage, '<div data-error-stimulus="Error">Sorry, '.ITOP_APPLICATION_SHORT.' is in <b>demonstration mode</b>: the feature is disabled.</div>');
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
@@ -141,7 +137,7 @@ JS
|
|||||||
|
|
||||||
if (utils::GetConfig()->Get('demo_mode'))
|
if (utils::GetConfig()->Get('demo_mode'))
|
||||||
{
|
{
|
||||||
DisplayErrorAndDie($oPage, '<div data-error-stimulus="Error">Sorry, iTop is in <b>demonstration mode</b>: the feature is disabled.</div>');
|
DisplayErrorAndDie($oPage, '<div data-error-stimulus="Error">Sorry, '.ITOP_APPLICATION_SHORT.' is in <b>demonstration mode</b>: the feature is disabled.</div>');
|
||||||
}
|
}
|
||||||
|
|
||||||
$sToken = utils::ReadParam('token', '', false, 'raw_data');
|
$sToken = utils::ReadParam('token', '', false, 'raw_data');
|
||||||
@@ -200,7 +196,7 @@ JS
|
|||||||
|
|
||||||
if (utils::GetConfig()->Get('demo_mode'))
|
if (utils::GetConfig()->Get('demo_mode'))
|
||||||
{
|
{
|
||||||
throw new Exception('iTop is in demonstration mode: the feature is disabled');
|
throw new Exception(ITOP_APPLICATION_SHORT.' is in demonstration mode: the feature is disabled');
|
||||||
}
|
}
|
||||||
$sFile = utils::ReadParam('file', '', false, 'raw_data');
|
$sFile = utils::ReadParam('file', '', false, 'raw_data');
|
||||||
$oBackup = new DBBackupScheduled();
|
$oBackup = new DBBackupScheduled();
|
||||||
|
|||||||
Reference in New Issue
Block a user