mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
Merge remote-tracking branch 'origin/develop' into feature/backoffice-full-moon-design
# Conflicts: # webservices/import.php
This commit is contained in:
@@ -42,7 +42,7 @@ function UsageAndExit($oP)
|
||||
if ($bModeCLI)
|
||||
{
|
||||
$oP->p("USAGE:\n");
|
||||
$oP->p("php -q synchro_exec.php --auth_user=<login> --auth_pwd=<password> --data_sources=<comma_separated_list_of_data_sources> [max_chunk_size=<limit the count of replica loaded in a single pass>]\n");
|
||||
$oP->p("php -q synchro_exec.php --auth_user=<login> --auth_pwd=<password> --data_sources=<comma_separated_list_of_data_sources> [--max_chunk_size=<limit the count of replica loaded in a single pass>] [--simulate=<If set to 1, then the synchro will not be executed, but the expected report will be produced>]\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -89,12 +89,8 @@ catch(Exception $e)
|
||||
|
||||
if (utils::IsModeCLI())
|
||||
{
|
||||
// Next steps:
|
||||
// specific arguments: 'csvfile'
|
||||
//
|
||||
$sAuthUser = ReadMandatoryParam($oP, 'auth_user', 'raw_data');
|
||||
$sAuthPwd = ReadMandatoryParam($oP, 'auth_pwd', 'raw_data');
|
||||
$sDataSourcesList = ReadMandatoryParam($oP, 'data_sources', 'raw_data'); // May contain commas
|
||||
if (UserRights::CheckCredentials($sAuthUser, $sAuthPwd))
|
||||
{
|
||||
UserRights::Login($sAuthUser); // Login & set the user's language
|
||||
@@ -110,16 +106,15 @@ else
|
||||
{
|
||||
require_once(APPROOT.'/application/loginwebpage.class.inc.php');
|
||||
LoginWebPage::DoLogin(); // Check user rights and prompt if needed
|
||||
|
||||
$sDataSourcesList = utils::ReadParam('data_sources', null, true, 'raw_data');
|
||||
|
||||
if ($sDataSourcesList == null)
|
||||
{
|
||||
UsageAndExit($oP);
|
||||
}
|
||||
}
|
||||
|
||||
$bSimulate = (utils::ReadParam('simulate', '0', true) == '1');
|
||||
$sDataSourcesList = ReadMandatoryParam($oP, 'data_sources', 'raw_data'); // May contain commas
|
||||
|
||||
if ($sDataSourcesList == null)
|
||||
{
|
||||
UsageAndExit($oP);
|
||||
}
|
||||
|
||||
|
||||
foreach(explode(',', $sDataSourcesList) as $iSDS)
|
||||
|
||||
Reference in New Issue
Block a user