summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Pott2014-10-29 10:35:24 (GMT)
committerAlex Pott2014-10-29 10:35:24 (GMT)
commitb68e063efec293ee2411c9eae7540a18b1953ca1 (patch)
tree7c3ccd9f95784780c1d158d8d97bf5337105d357
parente95124df922a07fbf1e0f88b80bf843bbb545f92 (diff)
Revert "Issue #2208811 by Pol, ivanjaros, dawehner: Fixed Views with arguments stopped working on front-end."
This reverts commit c55ac96895bd76bacaffb108c9f10b12d23a84e7.
-rw-r--r--core/modules/views/src/Tests/ModuleTest.php14
-rw-r--r--core/modules/views/src/ViewExecutable.php2
-rw-r--r--core/modules/views/tests/modules/views_test_config/test_views/views.view.test_argument.yml86
3 files changed, 2 insertions, 100 deletions
diff --git a/core/modules/views/src/Tests/ModuleTest.php b/core/modules/views/src/Tests/ModuleTest.php
index 9d4b1d1..1f52a19 100644
--- a/core/modules/views/src/Tests/ModuleTest.php
+++ b/core/modules/views/src/Tests/ModuleTest.php
@@ -23,7 +23,7 @@ class ModuleTest extends ViewUnitTestBase {
*
* @var array
*/
- public static $testViews = array('test_view_status', 'test_view', 'test_argument');
+ public static $testViews = array('test_view_status', 'test_view');
/**
* Modules to enable.
@@ -269,18 +269,6 @@ class ModuleTest extends ViewUnitTestBase {
}
/**
- * Tests views.module: views_embed_view().
- */
- public function testViewsEmbedView() {
- \Drupal::moduleHandler()->install(array('user'));
- $result = views_embed_view('test_argument');
- $this->assertEqual(count($result['#view']->result), 5);
-
- $result = views_embed_view('test_argument', 'default', 1);
- $this->assertEqual(count($result['#view']->result), 1);
- }
-
- /**
* Helper to return an expected views option array.
*
* @param array $views
diff --git a/core/modules/views/src/ViewExecutable.php b/core/modules/views/src/ViewExecutable.php
index 406a892..c5eda99 100644
--- a/core/modules/views/src/ViewExecutable.php
+++ b/core/modules/views/src/ViewExecutable.php
@@ -439,7 +439,7 @@ class ViewExecutable {
* but possibly from elsewhere.
*/
public function setArguments($args) {
- $this->args = array_values($args);
+ $this->args = $args;
}
/**
diff --git a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_argument.yml b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_argument.yml
deleted file mode 100644
index 39ca73f..0000000
--- a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_argument.yml
+++ /dev/null
@@ -1,86 +0,0 @@
-base_table: views_test_data
-core: '8'
-description: ''
-status: '1'
-display:
- default:
- display_options:
- defaults:
- fields: '0'
- pager: '0'
- pager_options: '0'
- sorts: '0'
- arguments: '0'
- fields:
- age:
- field: age
- id: age
- relationship: none
- table: views_test_data
- provider: views_test_data
- id:
- field: id
- id: id
- relationship: none
- table: views_test_data
- provider: views_test_data
- name:
- field: name
- id: name
- relationship: none
- table: views_test_data
- provider: views_test_data
- pager:
- options:
- offset: '0'
- type: none
- pager_options: { }
- sorts:
- id:
- field: id
- id: id
- order: ASC
- relationship: none
- table: views_test_data
- provider: views_test_data
- arguments:
- id:
- default_action: ignore
- style_plugin: default_summary
- style_options: { }
- wildcard: all
- wildcard_substitution: All
- title: ''
- default_argument_type: fixed
- default_argument: ''
- validate:
- type: none
- fail: 'not found'
- break_phrase: '0'
- not: '0'
- id: id
- table: views_test_data
- field: id
- relationship: none
- default_options_div_prefix: ''
- default_argument_user: '0'
- default_argument_fixed: ''
- default_argument_php: ''
- validate_argument_node_type:
- page: '0'
- story: '0'
- validate_argument_node_access: '0'
- validate_argument_nid_type: nid
- validate_argument_vocabulary: { }
- validate_argument_type: tid
- validate_argument_transform: '0'
- validate_user_restrict_roles: '0'
- validate_argument_php: ''
- provider: views_test_data
- display_plugin: default
- display_title: Master
- id: default
- position: 0
-label: ''
-id: test_argument
-tag: ''