From acf91bc627b8feadb146229032455fa1e13c2ea1 Mon Sep 17 00:00:00 2001 From: drigato Date: Mon, 14 Apr 2014 12:13:48 -0400 Subject: [PATCH] CC-5786: Quota Enforcement in the File Upload API Small refactor --- .../modules/rest/controllers/MediaController.php | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/airtime_mvc/application/modules/rest/controllers/MediaController.php b/airtime_mvc/application/modules/rest/controllers/MediaController.php index 72fc067b1..ecd538a12 100644 --- a/airtime_mvc/application/modules/rest/controllers/MediaController.php +++ b/airtime_mvc/application/modules/rest/controllers/MediaController.php @@ -120,10 +120,10 @@ class Rest_MediaController extends Zend_Rest_Controller return; } - if (!$this->isDiskOverQuota()) { + if (Application_Model_Systemstatus::isDiskOverQuota()) { $this->getResponse() ->setHttpResponseCode(400) - ->appendBody("ERROR: Disk Quota limit reached."); + ->appendBody("ERROR: Disk Quota reached."); return; } @@ -430,13 +430,5 @@ class Rest_MediaController extends Zend_Rest_Controller return $response; } - private function isDiskOverQuota() - { - if (Application_Model_Systemstatus::isDiskOverQuota()) { - return true; - } - return false; - } - }