CC-5709: Airtime Analyzer

* A bunch of changes that somehow didn't make it into my last commit...
* confused
This commit is contained in:
Albert Santoni 2014-03-21 14:03:17 -04:00
parent f120caa093
commit 8f7ecafcf6
14 changed files with 212 additions and 109 deletions

View file

@ -198,7 +198,8 @@ class Rest_MediaController extends Zend_Rest_Controller
}
$file = CcFilesQuery::create()->findPk($id);
if ($file) {
$storedFile = Application_Model_StoredFile($file);
$con = Propel::getConnection();
$storedFile = new Application_Model_StoredFile($file, $con);
Application_Model_Preference::updateDiskUsage(-1 * abs(filesize($storedFile->getFilePath())));
$storedFile->delete(); //TODO: This checks your session permissions... Make it work without a session?
$file->delete();