diff --git a/airtime_mvc/application/controllers/ApiController.php b/airtime_mvc/application/controllers/ApiController.php index c7fbae673..ec35c64b8 100644 --- a/airtime_mvc/application/controllers/ApiController.php +++ b/airtime_mvc/application/controllers/ApiController.php @@ -632,7 +632,7 @@ class ApiController extends Zend_Controller_Action $all = $request->getParam('all'); $this->view->files = - Application_Model_StoredFile::listAllFiles($dir_id,$all); + Application_Model_StoredFile::listAllFiles($dir_id, $all); } public function listAllWatchedDirsAction() @@ -800,7 +800,7 @@ class ApiController extends Zend_Controller_Action $watchDir = Application_Model_MusicDir::getDirByPath($rd); // get all the files that is under $dirPath $files = Application_Model_StoredFile::listAllFiles( - $dir->getId(),$all=false, true); + $dir->getId(),$all=false); foreach ($files as $f) { // if the file is from this mount if (substr($f->getFilePath(), 0, strlen($rd)) === $rd) { diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index 4cfc7cb94..5db22107c 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -1071,7 +1071,7 @@ SQL; * @param $dir_id - if this is not provided, it returns all files with full * path constructed. */ - public static function listAllFiles($dir_id=null, $all) + public static function listAllFiles($dir_id=null, $all=true) { $con = Propel::getConnection(); @@ -1081,10 +1081,6 @@ FROM CC_FILES AS f WHERE f.directory = :dir_id SQL; - # TODO : the option $all is deprecated now and is always true. - # refactor code where it's still being passed - $all = true; - if (!$all) { $sql .= " AND f.file_exists = 'TRUE'"; }