renamed displayable to visible

This commit is contained in:
Rudi Grinberg 2012-11-05 10:57:18 -05:00
parent acf954f637
commit 1c628bd831
4 changed files with 7 additions and 7 deletions

View file

@ -379,7 +379,7 @@ SQL;
{ {
$file = CcFilesQuery::create()->findPK($p_item, $this->con); $file = CcFilesQuery::create()->findPK($p_item, $this->con);
if (isset($file) && $file->displayable()) { if (isset($file) && $file->visible()) {
$entry = $this->blockItem; $entry = $this->blockItem;
$entry["id"] = $file->getDbId(); $entry["id"] = $file->getDbId();
$entry["pos"] = $pos; $entry["pos"] = $pos;

View file

@ -373,7 +373,7 @@ SQL;
} }
if (isset($obj)) { if (isset($obj)) {
if (($obj instanceof CcFiles && $obj->displayable()) if (($obj instanceof CcFiles && $obj->visible())
|| $obj instanceof CcWebstream || || $obj instanceof CcWebstream ||
$obj instanceof CcBlock) { $obj instanceof CcBlock) {

View file

@ -137,7 +137,7 @@ class Application_Model_Scheduler
if ($type === "audioclip") { if ($type === "audioclip") {
$file = CcFilesQuery::create()->findPK($id, $this->con); $file = CcFilesQuery::create()->findPK($id, $this->con);
if (is_null($file) || !$file->displayable()) { if (is_null($file) || !$file->visible()) {
throw new Exception("A selected File does not exist!"); throw new Exception("A selected File does not exist!");
} else { } else {
$data = $this->fileInfo; $data = $this->fileInfo;
@ -195,7 +195,7 @@ class Application_Model_Scheduler
$dynamicFiles = $bl->getListOfFilesUnderLimit(); $dynamicFiles = $bl->getListOfFilesUnderLimit();
foreach ($dynamicFiles as $fileId=>$f) { foreach ($dynamicFiles as $fileId=>$f) {
$file = CcFilesQuery::create()->findPk($fileId); $file = CcFilesQuery::create()->findPk($fileId);
if (isset($file) && $file->displayable()) { if (isset($file) && $file->visible()) {
$data["id"] = $file->getDbId(); $data["id"] = $file->getDbId();
$data["cliplength"] = $file->getDbLength(); $data["cliplength"] = $file->getDbLength();
$data["cuein"] = "00:00:00"; $data["cuein"] = "00:00:00";
@ -217,7 +217,7 @@ class Application_Model_Scheduler
//need to return //need to return
$stream = CcWebstreamQuery::create()->findPK($id, $this->con); $stream = CcWebstreamQuery::create()->findPK($id, $this->con);
if (is_null($stream) /* || !$file->displayable() */) { if (is_null($stream) /* || !$file->visible() */) {
throw new Exception("A selected File does not exist!"); throw new Exception("A selected File does not exist!");
} else { } else {
$data = $this->fileInfo; $data = $this->fileInfo;
@ -252,7 +252,7 @@ class Application_Model_Scheduler
$dynamicFiles = $bl->getListOfFilesUnderLimit(); $dynamicFiles = $bl->getListOfFilesUnderLimit();
foreach ($dynamicFiles as $fileId=>$f) { foreach ($dynamicFiles as $fileId=>$f) {
$file = CcFilesQuery::create()->findPk($fileId); $file = CcFilesQuery::create()->findPk($fileId);
if (isset($file) && $file->displayable()) { if (isset($file) && $file->visible()) {
$data["id"] = $file->getDbId(); $data["id"] = $file->getDbId();
$data["cliplength"] = $file->getDbLength(); $data["cliplength"] = $file->getDbLength();
$data["cuein"] = "00:00:00"; $data["cuein"] = "00:00:00";

View file

@ -42,7 +42,7 @@ class CcFiles extends BaseCcFiles {
} }
// returns true if the file exists and is not hidden // returns true if the file exists and is not hidden
public function displayable() { public function visible() {
return $this->getDbFileExists() && !$this->getDbHidden(); return $this->getDbFileExists() && !$this->getDbHidden();
} }