From aa9a6691f297d8bf3f344d9097e365999406ee23 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Mon, 5 Nov 2012 10:08:29 -0500 Subject: [PATCH] added a single test for checking if a file should be shown or not --- airtime_mvc/application/models/airtime/CcFiles.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/airtime_mvc/application/models/airtime/CcFiles.php b/airtime_mvc/application/models/airtime/CcFiles.php index 5e35d4790..4908add32 100644 --- a/airtime_mvc/application/models/airtime/CcFiles.php +++ b/airtime_mvc/application/models/airtime/CcFiles.php @@ -41,6 +41,11 @@ class CcFiles extends BaseCcFiles { return $this; } + // returns true if the file exists and is not hidden + public function displayable() { + return $this->getDbFileExists() && !$this->getDbHidden(); + } + public function reassignTo($user) { $this->setDbOwnerId( $user->getDbId() );