BUG 9881 PM 2.0.44 testing 3. Al enviar una combinacion invalidad de parametros a PMFNewCase() se vence la sesion del usuario.
PROBLEM The session vars were replaced with invalid values. SOLUTION Restore the session vars with healty values.
This commit is contained in:
@@ -52,7 +52,6 @@ EOT
|
||||
);
|
||||
CLI::taskArg('workspace', false);
|
||||
CLI::taskArg('backup-file', true);
|
||||
CLI::taskOpt("filesize", "Set the max size of the compresed splitted files, by default the max is 1000 Mb.", "s:","filesize=");
|
||||
CLI::taskRun(run_workspace_backup);
|
||||
|
||||
CLI::taskName('workspace-restore');
|
||||
@@ -71,12 +70,11 @@ CLI::taskArg('backup-file', false);
|
||||
CLI::taskArg('workspace', true);
|
||||
CLI::taskOpt("overwrite", "If a workspace already exists, overwrite it.", "o", "overwrite");
|
||||
CLI::taskOpt("info", "Only shows information about a backup archive.", "i");
|
||||
CLI::taskOpt("multiple", "Restore from multiple compresed enumerated files.", "m");
|
||||
CLI::taskOpt("workspace", "Select which workspace to restore if multiple workspaces are present in the archive.",
|
||||
"w:", "workspace=");
|
||||
CLI::taskRun(run_workspace_restore);
|
||||
|
||||
CLI::taskName('cacheview-rep air');
|
||||
CLI::taskName('cacheview-repair');
|
||||
CLI::taskDescription(<<<EOT
|
||||
Create and populate the APP_CACHE_VIEW table
|
||||
|
||||
@@ -376,29 +374,14 @@ function run_workspace_backup($args, $opts) {
|
||||
if (!$workspace->workspaceExists())
|
||||
throw new Exception("Workspace '{$workspace->name}' not found");
|
||||
//If this is a relative path, put the file in the backups directory
|
||||
if (strpos($filename, "/") === false && strpos($filename, '\\') === false){
|
||||
if (strpos($filename, "/") === false && strpos($filename, '\\') === false)
|
||||
$filename = PATH_DATA . "backups/$filename";
|
||||
}
|
||||
CLI::logging("Backing up to $filename\n");
|
||||
$backup = workspaceTools::createBackup($filename);
|
||||
|
||||
$filesize = array_key_exists("filesize", $opts) ? $opts['filesize'] : -1;
|
||||
if($filesize >= 0)
|
||||
{
|
||||
$multipleBackup = new MultipleFilesBackup ($filename,$filesize);//if filesize is 0 the default size will be took
|
||||
//using new method
|
||||
foreach ($workspaces as $workspace){
|
||||
$multipleBackup->addToBackup($workspace);
|
||||
}
|
||||
$multipleBackup->letsBackup();
|
||||
}
|
||||
else
|
||||
{
|
||||
//ansient method to backup into one large file
|
||||
$backup = workspaceTools::createBackup($filename);
|
||||
foreach ($workspaces as $workspace)
|
||||
$workspace->backup($backup);
|
||||
|
||||
foreach ($workspaces as $workspace)
|
||||
$workspace->backup($backup);
|
||||
}
|
||||
CLI::logging("\n");
|
||||
workspaceTools::printSysInfo();
|
||||
foreach ($workspaces as $workspace) {
|
||||
@@ -422,15 +405,8 @@ function run_workspace_restore($args, $opts) {
|
||||
CLI::logging("Restoring from $filename\n");
|
||||
$workspace = array_key_exists("workspace", $opts) ? $opts['workspace'] : NULL;
|
||||
$overwrite = array_key_exists("overwrite", $opts);
|
||||
$multiple = array_key_exists("multiple", $opts);
|
||||
$dstWorkspace = $args[1];
|
||||
//echo "filename: ".$filename." workspace:".$workspace." dts:".$dstWorkspace." over:".$overwrite." multiple:".$multiple."\n";
|
||||
if(!empty($multiple)){
|
||||
MultipleFilesBackup::letsRestore ($filename,$workspace,$dstWorkspace,$overwrite);
|
||||
}
|
||||
else{
|
||||
workspaceTools::restore($filename, $workspace, $dstWorkspace, $overwrite);
|
||||
}
|
||||
workspaceTools::restore($filename, $workspace, $dstWorkspace, $overwrite);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user