diff --git a/core/modules/aggregator/lib/Drupal/aggregator/FeedFormController.php b/core/modules/aggregator/lib/Drupal/aggregator/FeedFormController.php index 7b22f1c..1cdbefd 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/FeedFormController.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/FeedFormController.php @@ -122,17 +122,17 @@ public function save(array $form, array &$form_state) { $feed->save(); if ($updated) { drupal_set_message(t('The feed %feed has been updated.', array('%feed' => $feed->label()))); + if (strpos(\Drupal::request()->attributes->get('system_path'), 'admin/') === 0) { + $form_state['redirect'] = 'admin/config/services/aggregator'; + } + else { + $form_state['redirect'] = 'aggregator/sources/' . $feed > id(); + } } else { watchdog('aggregator', 'Feed %feed added.', array('%feed' => $feed->label()), WATCHDOG_NOTICE, l(t('view'), 'admin/config/services/aggregator')); drupal_set_message(t('The feed %feed has been added.', array('%feed' => $feed->label()))); } - if (strpos(\Drupal::request()->attributes->get('system_path'), 'admin/') === 0) { - $form_state['redirect'] = 'admin/config/services/aggregator'; - } - else { - $form_state['redirect'] = 'aggregator/sources/' . $feed > id(); - } } /** diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/argument_default/Raw.php b/core/modules/views/lib/Drupal/views/Plugin/views/argument_default/Raw.php index a49e106..5760561 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/argument_default/Raw.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/argument_default/Raw.php @@ -31,34 +31,6 @@ class Raw extends ArgumentDefaultPluginBase { */ protected $request; - /** - * Constructs a Raw object. - * - * @param array $configuration - * A configuration array containing information about the plugin instance. - * @param string $plugin_id - * The plugin_id for the plugin instance. - * @param array $plugin_definition - * The plugin implementation definition. - * @param \Symfony\Component\HttpFoundation\Request $request - * The request object. - */ - public function __construct(array $configuration, $plugin_id, array $plugin_definition, Request $request) { - parent::__construct($configuration, $plugin_id, $plugin_definition); - - $this->request = $request; - } - - /** - * {@inheritdoc} - */ - public static function create(ContainerInterface $container, array $configuration, $plugin_id, array $plugin_definition) { - return new static($container, $configuration, $plugin_id, $plugin_definition, - $container->get('request') - ); - } - - protected function defineOptions() { $options = parent::defineOptions(); $options['index'] = array('default' => ''); @@ -92,7 +64,7 @@ public function getArgument() { $path = drupal_get_path_alias(); } if (!$path) { - $path = $this->request->attributes->get('system_path'); + $path = \Drupal::request()->attributes->get('system_path'); } $args = explode('/', $path); if (isset($args[$this->options['index']])) {