commit dd43c917f1347afec103b27c28c3900f8db7ce8b Author: kgoel Date: Wed May 29 00:24:09 2013 -0400 Issue# 1978976 addressed issues under comment# 22 diff --git a/core/modules/shortcut/lib/Drupal/shortcut/Form/SetSwitch.php b/core/modules/shortcut/lib/Drupal/shortcut/Form/SetSwitch.php index 766ff7a..3a38127 100644 --- a/core/modules/shortcut/lib/Drupal/shortcut/Form/SetSwitch.php +++ b/core/modules/shortcut/lib/Drupal/shortcut/Form/SetSwitch.php @@ -13,7 +13,8 @@ use Drupal\menu_link\MenuLinkStorageContainer; use Drupal\shortcut\Plugin\Core\Entity\shortcut; use Drupal\Component\DependencyInjection\ContainerInterface; -Use Drupal\Component\Utility\String; +use Drupal\Component\Utility\String; +use Symfony\Component\HttpFoundation\Request; /** * Builds the shortcut set switch form. @@ -35,7 +36,6 @@ class SetSwitch implements ControllerInterface, FormInterface { */ public function __construct(EntityManager $entity_manager) { $this->entityManager = $entity_manager; - $this->currentPath = $request->attributes->get('system_path'); } /** @@ -57,7 +57,7 @@ public function getFormID() { /** * {@inheritdoc} */ - public function buildForm(array $form, array &$form_state, $account = NULL) { + public function buildForm(array $form, array &$form_state, Request $request = NULL) { global $user; if (!isset($account)) { $account = $user; @@ -164,6 +164,7 @@ function validateForm(array $form, array &$form_state) { */ function submitForm(array $form, array &$form_state) { global $user; + $this->currentPath = $request->attributes->get('system_path'); $account = $form_state['values']['account']; if ($form_state['values']['set'] == 'new') {