From f9319b869afd8711222108d3973cb8c0856c4df9 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Tue, 18 Sep 2012 12:08:30 -0400 Subject: [PATCH] Corrected comments --- airtime_mvc/application/models/StoredFile.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index e31e6fd4e..dd945d328 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -418,13 +418,15 @@ SQL; */ public function getFileExtension() { - // TODO : what's the point of having this function? Can we not just use - // the extension from the file_path column from cc_files? $possible_ext = $this->getRealFileExtension(); if ($possible_ext !== "") { return $possible_ext; } + + // We fallback to guessing the extension from the mimetype if we + // cannot extract it from the file name + $mime = $this->_file->getDbMime(); if ($mime == "audio/ogg" || $mime == "application/ogg") {