From e0286b112f6dff9b4cd6f6888d7d394e405a5c73 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Wed, 12 Sep 2012 11:10:25 -0400 Subject: [PATCH] cc-4292: Removed unnecessary code related to md5. --- airtime_mvc/application/models/StoredFile.php | 54 +------------------ 1 file changed, 1 insertion(+), 53 deletions(-) diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index ef921f802..ab17314dc 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -43,7 +43,7 @@ class Application_Model_StoredFile "bit_rate" => "DbBitRate", "sample_rate" => "DbSampleRate", "mime" => "DbMime", - "md5" => "DbMd5", + //"md5" => "DbMd5", "ftype" => "DbFtype", "language" => "DbLanguage", "replay_gain" => "DbReplayGain", @@ -540,47 +540,6 @@ SQL; return $storedFile; } - //public static function Recall2($p_id=null, $p_gunid=null, $p_md5sum=null, $p_filepath=null, $exist=false) - //{ - //if (isset($p_id)) { - //$file = CcFilesQuery::create()->findPK(intval($p_id)); - //} elseif (isset($p_md5sum)) { - //if ($exist) { - //$file = CcFilesQuery::create() - //->filterByDbMd5($p_md5sum) - //->filterByDbFileExists(true) - //->findOne(); - //} else { - //$file = CcFilesQuery::create() - //->filterByDbMd5($p_md5sum) - //->findOne(); - //} - //} elseif (isset($p_filepath)) { - //$path_info = Application_Model_MusicDir::splitFilePath($p_filepath); - - //if (is_null($path_info)) { - //return null; - //} - //$music_dir = Application_Model_MusicDir::getDirByPath($path_info[0]); - - //$file = CcFilesQuery::create() - //->filterByDbDirectory($music_dir->getId()) - //->filterByDbFilepath($path_info[1]) - //->findOne(); - //} else { - //return null; - //} - - //if (isset($file)) { - //$storedFile = new Application_Model_StoredFile(); - //$storedFile->_file = $file; - - //return $storedFile; - //} else { - //return null; - //} - //} - public static function Recall($p_id=null, $p_gunid=null, $p_md5sum=null, $p_filepath=null) { if( isset($p_id ) ) { @@ -604,17 +563,6 @@ SQL; return $info['filename']; } - /** - * Fetch the Application_Model_StoredFile by looking up the MD5 value. - * - * @param string $p_md5sum - * @return Application_Model_StoredFile|NULL - */ - public static function RecallByMd5($p_md5sum, $exist=false) - { - return Application_Model_StoredFile::Recall(null, null, $p_md5sum, null, $exist); - } - /** * Fetch the Application_Model_StoredFile by looking up its filepath. *