Commit 7f04b598 authored by damiankloip's avatar damiankloip Committed by tim.plunkett

Added temporary parameters to default views to avoid warnings

parent 6aa02080
......@@ -162,7 +162,7 @@ function options_form(&$form, &$form_state) {
* We use this to obtain our subquery SQL.
*/
function get_temporary_view() {
$view = new View();
$view = new View(array(), 'view');
$view->vid = 'new'; // @todo: what's this?
$view->base_table = $this->definition['base'];
$view->add_display('default');
......
......@@ -142,7 +142,7 @@ function testDynamicAccessPlugin() {
}
function view_access_none() {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_access_none';
$view->description = '';
$view->tag = '';
......@@ -165,7 +165,7 @@ function view_access_none() {
}
function view_access_perm() {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_access_perm';
$view->description = '';
$view->tag = '';
......@@ -189,7 +189,7 @@ function view_access_perm() {
}
function view_access_role() {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_access_role';
$view->description = '';
$view->tag = '';
......@@ -215,7 +215,7 @@ function view_access_role() {
}
function view_access_dynamic() {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_access_dynamic';
$view->description = '';
$view->tag = '';
......@@ -241,7 +241,7 @@ function view_access_dynamic() {
}
function view_access_static() {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_access_static';
$view->description = '';
$view->tag = '';
......
......@@ -96,7 +96,7 @@ function testArgumentDefaultFixed() {
//function testArgumentDefaultNode() {}
function view_argument_default_fixed() {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_argument_default_fixed';
$view->description = '';
$view->tag = '';
......
......@@ -46,7 +46,7 @@ function testArgumentValidateNumeric() {
function view_test_argument_validate_php($string) {
$code = 'return $argument == \''. $string .'\';';
$view = new View();
$view = new View(array(), 'view');
$view->name = 'view_argument_validate_numeric';
$view->description = '';
$view->tag = '';
......@@ -78,7 +78,7 @@ function view_test_argument_validate_php($string) {
}
function view_argument_validate_numeric() {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'view_argument_validate_numeric';
$view->description = '';
$view->tag = '';
......
......@@ -31,7 +31,7 @@ public static function getInfo() {
*/
protected function getBasicView() {
// Create the basic view.
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_view';
$view->add_display('default');
$view->base_table = 'views_test';
......
......@@ -74,7 +74,7 @@ function testCommentUserUidTest() {
}
function view_comment_user_uid() {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_comment_user_uid';
$view->description = '';
$view->tag = 'default';
......
......@@ -201,7 +201,7 @@ public function _testMultipleFieldRender() {
}
protected function getFieldView() {
$view = new View;
$view = new View(array(), 'view');
$view->name = 'view_fieldapi';
$view->description = '';
$view->tag = 'default';
......
......@@ -62,7 +62,7 @@ function testGlossary() {
* @return Drupal\views\View
*/
function viewGlossary() {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_glossary';
$view->description = '';
$view->tag = 'default';
......
......@@ -155,7 +155,7 @@ function testUiValidation() {
}
function views_test_between() {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_filter_date_between';
$view->description = '';
$view->tag = '';
......
......@@ -47,7 +47,9 @@ function test_views_break_phrase_string() {
$empty_stdclass->operator = 'or';
$empty_stdclass->value = array();
views_include('handlers');
$null = NULL;
// check defaults
$this->assertEqual($empty_stdclass, views_break_phrase_string('', $null));
......
......@@ -96,7 +96,7 @@ public function testStorePagerSettings() {
}
public function viewsStorePagerSettings() {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_store_pager_settings';
$view->description = '';
$view->tag = '';
......@@ -155,7 +155,7 @@ public function testNoLimit() {
}
public function viewsPagerNoLimit() {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_pager_none';
$view->description = '';
$view->tag = '';
......@@ -231,7 +231,7 @@ public function testLimit() {
}
public function viewsPagerLimit() {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_pager_some';
$view->description = '';
$view->tag = '';
......@@ -315,7 +315,7 @@ public function testNormalPager() {
}
function viewPagerFullZeroItemsPerPage() {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'view_pager_full_zero_items_per_page';
$view->description = '';
$view->tag = '';
......@@ -355,7 +355,7 @@ function viewPagerFullZeroItemsPerPage() {
}
function viewsPagerFull() {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_pager_full';
$view->description = '';
$view->tag = '';
......@@ -381,7 +381,7 @@ function viewsPagerFull() {
}
function viewsPagerFullFields() {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_pager_full';
$view->description = '';
$view->tag = '';
......
......@@ -43,7 +43,7 @@ function testFilterGroupsOverriding() {
* @return Drupal\views\View
*/
function viewFilterGroupsOverriding() {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_filter_group_override';
$view->description = '';
$view->tag = 'default';
......@@ -92,7 +92,7 @@ function viewFilterGroupsOverriding() {
* @return Drupal\views\View
*/
function viewFilterGroupsUpdating() {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_filter_groups';
$view->description = '';
$view->tag = 'default';
......
......@@ -72,7 +72,7 @@ public function testAggregateCount() {
//}
public function viewsAggregateCountView() {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'aggregate_count';
$view->description = '';
$view->tag = '';
......@@ -157,7 +157,7 @@ function GroupByTestHelper($group_by, $values) {
}
function viewsGroupByViewHelper($group_by) {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'group_by_count';
$view->description = '';
$view->tag = '';
......@@ -251,7 +251,7 @@ public function testGroupByCountOnlyFilters() {
}
public function viewsGroupByCountViewOnlyFilters() {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'group_by_in_filters';
$view->description = '';
$view->tag = '';
......
......@@ -70,7 +70,7 @@ function testViewsHandlerRelationshipNodeTermData() {
}
function view_taxonomy_node_term_data() {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_taxonomy_node_term_data';
$view->description = '';
$view->tag = '';
......
......@@ -142,7 +142,7 @@ public function testTranslationKey() {
}
public function view_unpack_translatable() {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'view_unpack_translatable';
$view->description = '';
$view->tag = '';
......
......@@ -119,7 +119,7 @@ public function testUpgradeImport() {
}
public function viewsMovedToField() {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_views_move_to_field';
$view->description = '';
$view->tag = '';
......@@ -140,7 +140,7 @@ public function viewsMovedToField() {
}
public function viewsMovedToHandler() {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_views_move_to_handler';
$view->description = '';
$view->tag = '';
......@@ -165,7 +165,7 @@ public function viewsMovedToHandler() {
}
public function viewsMovedToTable() {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_views_move_to_table';
$view->description = '';
$view->tag = '';
......@@ -187,7 +187,7 @@ public function viewsMovedToTable() {
protected function viewUpgradeImport() {
$import = '
$view = new Drupal\views\View();
$view = new Drupal\views\View(array(), "view");
$view->name = "comments_recent";
$view->description = "Contains a block and a page to list recent comments; the block will automatically link to the page, which displays the comment body as well as a link to the node.";
$view->tag = "default";
......
......@@ -58,7 +58,7 @@ function testUserName() {
}
function view_user_name() {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_views_handler_field_user_name';
$view->description = '';
$view->tag = 'default';
......
......@@ -46,7 +46,7 @@ public function test_plugin_argument_default_current_user() {
}
function view_plugin_argument_default_current_user() {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_plugin_argument_default_current_user';
$view->description = '';
$view->tag = '';
......
......@@ -88,7 +88,7 @@ function testArgumentValidateUserEither() {
}
function view_argument_validate_user($argtype) {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'view_argument_validate_user';
$view->description = '';
$view->tag = '';
......
......@@ -57,7 +57,7 @@ public function testRelationship() {
}
function test_view_user_relationship() {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_user_relationship';
$view->description = '';
$view->tag = 'default';
......
......@@ -105,7 +105,7 @@ function testValidate() {
* This view provides some filters, fields, arguments, relationships, sorts, areas and attachments.
*/
function view_test_destroy() {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_destroy';
$view->description = '';
$view->tag = '';
......@@ -261,7 +261,7 @@ function view_test_destroy() {
return $view;
}
function view_test_delete() {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_view_delete';
$view->description = '';
$view->tag = '';
......
......@@ -358,7 +358,7 @@ protected function dataSet() {
*/
protected function getBasicView() {
// Create the basic view.
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_view';
$view->add_display('default');
$view->base_table = 'views_test';
......
......@@ -11,7 +11,7 @@
function comment_views_default_views() {
$views = array();
$view = new Drupal\views\View();
$view = new Drupal\views\View(array(), 'view');
$view->name = 'comments_recent';
$view->description = 'Contains a block and a page to list recent comments; the block will automatically link to the page, which displays the comment body as well as a link to the node.';
$view->tag = 'default';
......
......@@ -11,7 +11,7 @@
function node_views_default_views() {
$views = array();
$view = new Drupal\views\View();
$view = new Drupal\views\View(array(), 'view');
$view->name = 'archive';
$view->description = 'Display a list of months that link to content for that month.';
$view->tag = 'default';
......
......@@ -10,7 +10,7 @@ function node_views_templates() {
if (variable_get('install_profile', 'standard') != 'standard') {
return array();
}
$view = new Drupal\views\View();
$view = new Drupal\views\View(array(), 'view');
$view->name = 'image_gallery';
$view->description = 'Shows all images which was uploaded on the "field_image" field';
$view->tag = '';
......
......@@ -11,7 +11,7 @@
function search_views_default_views() {
$views = array();
$view = new Drupal\views\View();
$view = new Drupal\views\View(array(), 'view');
$view->name = 'backlinks';
$view->description = 'Displays a list of nodes that link to the node, using the search backlinks table.';
$view->tag = 'default';
......
......@@ -11,7 +11,7 @@
function statistics_views_default_views() {
$views = array();
$view = new Drupal\views\View();
$view = new Drupal\views\View(array(), 'view');
$view->name = 'popular';
$view->description = 'Shows the most-viewed nodes on the site. This requires the statistics to be enabled at administer >> reports >> access log settings.';
$view->tag = 'default';
......
......@@ -11,7 +11,7 @@
function taxonomy_views_default_views() {
$views = array();
$view = new Drupal\views\View();
$view = new Drupal\views\View(array(), 'view');
$view->name = 'taxonomy_term';
$view->description = 'A view to emulate Drupal core\'s handling of taxonomy/term.';
$view->tag = 'default';
......
......@@ -11,7 +11,7 @@
* Implements hook_views_default_views().
*/
function views_test_views_default_views() {
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_views_groupby_save';
$view->description = '';
$view->tag = '';
......@@ -33,7 +33,7 @@ function views_test_views_default_views() {
$views[$view->name] = $view;
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_rename_reset_button';
$view->description = '';
$view->tag = '';
......@@ -72,7 +72,7 @@ function views_test_views_default_views() {
$views[$view->name] = $view;
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_exposed_admin_ui';
$view->description = '';
$view->tag = '';
......@@ -112,7 +112,7 @@ function views_test_views_default_views() {
$views[$view->name] = $view;
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_filter_in_operator_ui';
$view->description = '';
$view->tag = '';
......@@ -144,7 +144,7 @@ function views_test_views_default_views() {
$views[$view->name] = $view;
$view = new View();
$view = new View(array(), 'view');
$view->name = 'test_argument_default_current_user';
$view->description = '';
$view->tag = '';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment