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:
Naomi 2011-05-20 16:12:50 -04:00 committed by Paul Baranowski
parent 71ac8d4b1b
commit 2866bf46cd
2 changed files with 3 additions and 3 deletions

View File

@ -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() .'}}');

View File

@ -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++;