From bd3a9d65bc76d6b5c08913ce405af5afe047d52b Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Tue, 19 May 2015 11:00:36 +0200 Subject: [PATCH] Remove unreachable statements refs #9003 --- application/controllers/DashboardController.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/application/controllers/DashboardController.php b/application/controllers/DashboardController.php index 4558245a8..844247ffb 100644 --- a/application/controllers/DashboardController.php +++ b/application/controllers/DashboardController.php @@ -165,14 +165,13 @@ class DashboardController extends ActionController try { $dashboardConfig->saveIni(); Notification::success(t('Dashlet has been removed from') . ' ' . $pane->getTitle()); - return true; } catch (Exception $e) { $action->view->error = $e; $action->view->config = $dashboardConfig; $action->render('error'); return false; } - return false; + return true; }); $form->setTitle($this->translate('Remove Dashlet From Dashboard')); $form->setRedirectUrl('dashboard/settings'); @@ -202,14 +201,13 @@ class DashboardController extends ActionController try { $dashboardConfig->saveIni(); Notification::success(t('Dashboard has been removed') . ': ' . $pane->getTitle()); - return true; } catch (Exception $e) { $action->view->error = $e; $action->view->config = $dashboardConfig; $action->render('error'); return false; } - return false; + return true; }); $form->setTitle($this->translate('Remove Dashboard')); $form->setRedirectUrl('dashboard/settings');