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