From a924e23428ddd0a6afc7d9330a60cd61cac918d5 Mon Sep 17 00:00:00 2001 From: Alex Pott <alex.a.pott@googlemail.com> Date: Tue, 18 Nov 2014 23:34:41 +0000 Subject: [PATCH] Issue #2371229 by rpayanm, joshi.rohit100: Exceptions when adding and deleting shortcut are regular messages, should be error messages --- core/modules/shortcut/src/Controller/ShortcutController.php | 2 +- core/modules/shortcut/src/Controller/ShortcutSetController.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/modules/shortcut/src/Controller/ShortcutController.php b/core/modules/shortcut/src/Controller/ShortcutController.php index 85371dee05ec..25f32cb466d0 100644 --- a/core/modules/shortcut/src/Controller/ShortcutController.php +++ b/core/modules/shortcut/src/Controller/ShortcutController.php @@ -50,7 +50,7 @@ public function deleteShortcutLinkInline(ShortcutInterface $shortcut) { drupal_set_message($this->t('The shortcut %title has been deleted.', array('%title' => $label))); } catch (\Exception $e) { - drupal_set_message($this->t('Unable to delete the shortcut for %title.', array('%title' => $label))); + drupal_set_message($this->t('Unable to delete the shortcut for %title.', array('%title' => $label)), 'error'); } return $this->redirect('<front>'); diff --git a/core/modules/shortcut/src/Controller/ShortcutSetController.php b/core/modules/shortcut/src/Controller/ShortcutSetController.php index 729430f33c9f..1af8d24d3a12 100644 --- a/core/modules/shortcut/src/Controller/ShortcutSetController.php +++ b/core/modules/shortcut/src/Controller/ShortcutSetController.php @@ -72,7 +72,7 @@ public function addShortcutLinkInline(ShortcutSetInterface $shortcut_set, Reques drupal_set_message($this->t('Added a shortcut for %title.', array('%title' => $shortcut->label()))); } catch (\Exception $e) { - drupal_set_message($this->t('Unable to add a shortcut for %title.', array('%title' => $shortcut->label()))); + drupal_set_message($this->t('Unable to add a shortcut for %title.', array('%title' => $shortcut->label())), 'error'); } return $this->redirect('<front>'); -- GitLab