cc-4292: Initial fix of the MD5 issue. Now MD5's are only collected not really used for anything. Moves are handled completely

through paths.
This commit is contained in:
Rudi Grinberg 2012-09-11 16:02:39 -04:00
parent 6c1d7fedc1
commit 355b0ad35d
3 changed files with 12 additions and 8 deletions

View file

@ -513,11 +513,11 @@ class ApiController extends Zend_Controller_Action
$file->setMetadata($md);
}
} elseif ($mode == "moved") {
$md5 = $md['MDATA_KEY_MD5'];
$file = Application_Model_StoredFile::RecallByMd5($md5);
$file = Application_Model_StoredFile::RecallByFilepath(
$md['MDATA_KEY_ORIGINAL_PATH']);
if (is_null($file)) {
return "File doesn't exist in Airtime.";
$return_hash['error'] = 'File does not exist in Airtime';
} else {
$filepath = $md['MDATA_KEY_FILEPATH'];
//$filepath = str_replace("\\", "", $filepath);
@ -661,6 +661,7 @@ class ApiController extends Zend_Controller_Action
}
} elseif ($mode == "moved") {
$md5 = $md['MDATA_KEY_MD5'];
Logging::info("Original path: {$md['MDATA_KEY_ORIGINAL_PATH']}");
$file = Application_Model_StoredFile::RecallByMd5($md5);
if (is_null($file)) {