From a082ea6acc2884c4d06dca3a698c6c0aed630e57 Mon Sep 17 00:00:00 2001 From: Karthik Bhat K Date: Wed, 31 Jul 2019 11:36:47 +0530 Subject: [PATCH] added use Forbidden and removed unused class (#1372) --- application/Espo/Controllers/ScheduledJob.php | 4 +++- application/Espo/Controllers/ScheduledJobLogRecord.php | 5 +++-- application/Espo/Controllers/Settings.php | 6 ++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/application/Espo/Controllers/ScheduledJob.php b/application/Espo/Controllers/ScheduledJob.php index 495cf33f27..e3b565b02d 100644 --- a/application/Espo/Controllers/ScheduledJob.php +++ b/application/Espo/Controllers/ScheduledJob.php @@ -25,10 +25,12 @@ * * In accordance with Section 7(b) of the GNU General Public License version 3, * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. - ************************************************************************/ + ************************************************************************/ namespace Espo\Controllers; +use Espo\Core\Exceptions\Forbidden; + class ScheduledJob extends \Espo\Core\Controllers\Record { protected function checkControllerAccess() diff --git a/application/Espo/Controllers/ScheduledJobLogRecord.php b/application/Espo/Controllers/ScheduledJobLogRecord.php index 18177759bc..fca7534fbd 100644 --- a/application/Espo/Controllers/ScheduledJobLogRecord.php +++ b/application/Espo/Controllers/ScheduledJobLogRecord.php @@ -25,10 +25,12 @@ * * In accordance with Section 7(b) of the GNU General Public License version 3, * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. - ************************************************************************/ + ************************************************************************/ namespace Espo\Controllers; +use Espo\Core\Exceptions\Forbidden; + class ScheduledJobLogRecord extends \Espo\Core\Controllers\Record { protected function checkControllerAccess() @@ -38,4 +40,3 @@ class ScheduledJobLogRecord extends \Espo\Core\Controllers\Record } } } - diff --git a/application/Espo/Controllers/Settings.php b/application/Espo/Controllers/Settings.php index 0e4f6a2f49..56fdb1f326 100644 --- a/application/Espo/Controllers/Settings.php +++ b/application/Espo/Controllers/Settings.php @@ -29,13 +29,11 @@ namespace Espo\Controllers; -use \Espo\Core\Exceptions\Error; -use \Espo\Core\Exceptions\Forbidden; -use \Espo\Core\Exceptions\BadRequest; +use Espo\Core\Exceptions\Forbidden; +use Espo\Core\Exceptions\BadRequest; class Settings extends \Espo\Core\Controllers\Base { - protected function getConfigData() { $data = $this->getServiceFactory()->create('Settings')->getConfigData();