cc-4274: Fixed bad table name.
This commit is contained in:
parent
33bb4e600c
commit
05908d121f
|
@ -690,7 +690,7 @@ class ApiController extends Zend_Controller_Action
|
|||
$dir_id = $request->getParam('dir_id');
|
||||
|
||||
$this->view->files =
|
||||
Application_Model_StoredFile::listAllFiles($dir_id, $all=true);
|
||||
Application_Model_StoredFile::listAllFiles($dir_id,$all=true);
|
||||
}
|
||||
|
||||
public function listAllWatchedDirsAction()
|
||||
|
@ -863,7 +863,8 @@ 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(), true);
|
||||
$files = Application_Model_StoredFile::listAllFiles(
|
||||
$dir->getId(),$all=false, true);
|
||||
foreach ($files as $f) {
|
||||
// if the file is from this mount
|
||||
if (substr($f->getFilePath(), 0, strlen($rd)) === $rd) {
|
||||
|
|
|
@ -1003,8 +1003,7 @@ class Application_Model_StoredFile
|
|||
* @param $dir_id - if this is not provided, it returns all files with full path constructed.
|
||||
* @param $propelObj - if this is true, it returns array of proepl obj
|
||||
*/
|
||||
public static function listAllFiles($dir_id=null, $propelObj=false,
|
||||
$all=false)
|
||||
public static function listAllFiles($dir_id=null, $all, $propelObj=false)
|
||||
{
|
||||
$con = Propel::getConnection();
|
||||
|
||||
|
@ -1017,8 +1016,8 @@ class Application_Model_StoredFile
|
|||
." ON m.id = f.directory WHERE m.id = $dir_id $file_exists";
|
||||
} else {
|
||||
$sql = "SELECT filepath as fp"
|
||||
." FROM CC_FILES"
|
||||
." WHERE directory = $dir_id $file_exists";
|
||||
." FROM CC_FILES as f"
|
||||
." WHERE f.directory = $dir_id $file_exists";
|
||||
}
|
||||
$rows = $con->query($sql)->fetchAll();
|
||||
|
||||
|
|
Loading…
Reference in New Issue