Merged in bugfix/HOR-2962 (pull request #5590)

HOR-2962

Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
Roly
2017-05-10 19:29:39 +00:00
committed by Julio Cesar Laura Avendaño
2 changed files with 2 additions and 16 deletions

View File

@@ -290,18 +290,14 @@ EOT;
$taskOpts[$validOpts[$optName]] = $optArg;
}
} catch (Exception $e) {
$token = strtotime("now");
PMException::registerErrorLog($e, $token);
echo self::error( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
echo self::error( "Invalid options: " . $e->getMessage() ) . "\n\n";
self::help( $taskName );
return;
}
try {
call_user_func( $taskData['function'], $arguments, $taskOpts );
} catch (Exception $e) {
$token = strtotime("now");
PMException::registerErrorLog($e, $token);
echo self::error( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
echo self::error( "\n Error executing '$taskName':\n\n {$e->getMessage()}\n" ) . "\n";
global $tempDirectory;
if (!empty($tempDirectory)) {
G::rm_dir($tempDirectory);

View File

@@ -1710,16 +1710,6 @@ class workspaceTools
if (Installer::isset_site($workspaceName)) {
if ($overwrite) {
if ($workspace->dbInfo['DB_NAME'] == $workspace->dbInfo['DB_RBAC_NAME']) {
$newDatabases = 1;
} else {
$newDatabases = 3;
}
if ($newDatabases != $oldDatabases) {
throw new Exception("We can't overwrite this workspace because it has a different amount of databases. Not only the 'source' but also the 'target' must have the same amount of databases.");
}
if (!$workspace->workspaceExists()) {
throw new Exception('We can not overwrite this workspace because the workspace ' . $workspaceName . ' does not exist please check the lower case and upper case.');
}