CC-2282 Import script does not restore storage from backup if database is intact
making spaces after ifs to follow coding standards.
This commit is contained in:
parent
71ac8d4b1b
commit
2866bf46cd
|
@ -1790,11 +1790,11 @@ class StoredFile {
|
|||
die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": ' . $duplicate->getMessage() .'}}');
|
||||
}
|
||||
else {
|
||||
if(file_exists($duplicate->getRealFilePath())) {
|
||||
if (file_exists($duplicate->getRealFilePath())) {
|
||||
$duplicateName = $duplicate->getMetadataValue(UI_MDATA_KEY_TITLE);
|
||||
die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": "An identical audioclip named ' . $duplicateName . ' already exists in the storage server."}}');
|
||||
}
|
||||
else{
|
||||
else {
|
||||
$res = $duplicate->replaceFile($audio_file);
|
||||
if (PEAR::isError($res)) {
|
||||
die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": ' . $duplicate->getMessage() .'}}');
|
||||
|
|
|
@ -211,7 +211,7 @@ function import_audio_file($p_filepath, $p_importMode = null, $p_testOnly = fals
|
|||
}
|
||||
|
||||
//row exists in database
|
||||
if(isset($duplicate)) {
|
||||
if (isset($duplicate)) {
|
||||
if (file_exists($duplicate->getRealFilePath())) {
|
||||
echo "DUPLICATE: $p_filepath\n";
|
||||
$g_duplicates++;
|
||||
|
|
Loading…
Reference in New Issue