diff --git a/lib/Drupal/views/Tests/ModuleTest.php b/lib/Drupal/views/Tests/ModuleTest.php index 5563db83a767e0861e28cfd4f2de09e9f381a7ad..34c99570a5ebe0e5f4ee5ca9c5f2b1f3c116460c 100644 --- a/lib/Drupal/views/Tests/ModuleTest.php +++ b/lib/Drupal/views/Tests/ModuleTest.php @@ -92,10 +92,6 @@ public function test_views_trim_text() { * Tests the dynamic includes of templates via module feature. */ function testModuleTemplates() { - $views_status = variable_get('views_defaults', array()); - $views_status['frontpage'] = FALSE; // false is enabled - variable_set('views_defaults', $views_status); - $existing = array(); $type = array(); $theme = array(); diff --git a/lib/Drupal/views/Tests/ViewsSqlTest.php b/lib/Drupal/views/Tests/ViewsSqlTest.php index cd1c79a4eeb4fd53fca7804a6917ebdf1f33e1fa..0a7250d79cda34224d24a1faac53c04d074ca7e4 100644 --- a/lib/Drupal/views/Tests/ViewsSqlTest.php +++ b/lib/Drupal/views/Tests/ViewsSqlTest.php @@ -25,7 +25,6 @@ protected function setUp() { // @todo Remove this hack or move it to child classes. views_init(); - views_module_include('views_default', TRUE); views_get_all_views(TRUE); menu_router_rebuild(); } diff --git a/views.install b/views.install index baaadb6bba9206f0aedfb6560665aaaa91db7473..369c1ab8ed479bed94453acee9b2fd53e6fdf067 100644 --- a/views.install +++ b/views.install @@ -24,15 +24,8 @@ function views_schema() { 'identifier' => 'view', 'bulk export' => TRUE, 'primary key' => 'vid', - 'default hook' => 'views_default_views', 'admin_title' => 'human_name', 'admin_description' => 'description', - 'api' => array( - 'owner' => 'views', - 'api' => 'views_default', - 'minimum_version' => '2', - 'current_version' => '3.0', - ), 'object' => 'Drupal\views\View', 'load all callback' => 'views_get_all_views', 'load callback' => 'views_storage_load', diff --git a/views.module b/views.module index acb2d469938d08a0895c1f6d7710dec67fb3ddc7..39fd8f171d593663e43c9c5921c4816c6e266bc5 100644 --- a/views.module +++ b/views.module @@ -2374,45 +2374,6 @@ function views_clean_css_identifier($identifier, $filter = array(' ' => '-', '/' return $identifier; } -/** - * Implement hook_views_exportables(). - */ -function views_views_exportables($op = 'list', $views = NULL, $name = 'foo') { - $all_views = views_get_all_views(); - if ($op == 'list') { - - foreach ($all_views as $name => $view) { - // in list, $views is a list of tags. - if (empty($views) || in_array($view->tag, $views)) { - $return[$name] = array( - 'name' => check_plain($name), - 'desc' => check_plain($view->description), - 'tag' => check_plain($view->tag) - ); - } - } - return $return; - } - - if ($op == 'export') { - $code = "/**\n"; - $code .= " * Implement hook_views_default_views().\n"; - $code .= " */\n"; - $code .= "function " . $name . "_views_default_views() {\n"; - foreach ($views as $view => $truth) { - $code .= " /*\n"; - $code .= " * View " . var_export($all_views[$view]->name, TRUE) . "\n"; - $code .= " */\n"; - $code .= $all_views[$view]->export(' '); - $code .= ' $views[$view->name] = $view;' . "\n\n"; - } - $code .= " return \$views;\n"; - $code .= "}\n"; - - return $code; - } -} - /** * #process callback to see if we need to check_plain() the options. *