CC-1799 Put Airtime Storage into a Human Readable File Naming Convention

fixing problem with StoredFile::Insert()
This commit is contained in:
Naomi Aro 2011-06-09 12:57:30 +02:00
parent a4b92fe72d
commit 9da314979e
2 changed files with 13 additions and 11 deletions

View file

@ -389,6 +389,9 @@ class StoredFile {
$file->setDbGunid(md5(uniqid("", true)));
$file->save();
$storedFile = new StoredFile();
$storedFile->_file = $file;
if(isset($md)) {
if (preg_match("/mp3/i", $md['MDATA_KEY_MIME'])) {
$file->setDbFtype("audioclip");
@ -397,12 +400,9 @@ class StoredFile {
$file->setDbFtype("audioclip");
}
$this->setMetadata($md);
$storedFile->setMetadata($md);
}
$storedFile = new StoredFile();
$storedFile->_file = $file;
return $storedFile;
}
@ -444,10 +444,15 @@ class StoredFile {
return null;
}
$storedFile = new StoredFile();
$storedFile->_file = $file;
if (isset($file)) {
$storedFile = new StoredFile();
$storedFile->_file = $file;
return $storedFile;
return $storedFile;
}
else{
return null;
}
}
/**