diff --git a/core/modules/views/views.module b/core/modules/views/views.module index f37b94b..7d1c8ff 100644 --- a/core/modules/views/views.module +++ b/core/modules/views/views.module @@ -322,7 +322,7 @@ function views_menu() { */ function views_menu_alter(&$callbacks) { $our_paths = array(); - $views = views_get_applicable_views('uses_hook_menu'); + $views = views_get_applicable_views('path'); foreach ($views as $data) { list($view, $display_id) = $data; $result = $view->executeHookMenu($display_id, $callbacks); @@ -1111,16 +1111,16 @@ function views_get_applicable_views($type) { $query = drupal_container()->get('entity.query')->get('view') ->condition('disabled', '0') - ->condition('display.*.display_options.path', NULL, 'IS NOT NULL') + ->condition("display.*.display_options.$type", NULL, 'IS NOT NULL') ->execute(); - foreach (entity_get_controller('view')->load($query) as $view) { + foreach (drupal_container()->get('plugin.manager.entity')->getStorageController('view')->load($query) as $view) { // Check each display to see if it meets the criteria and is enabled. $executable = $view->get('executable'); $executable->initDisplay(); foreach ($executable->displayHandlers as $id => $handler) { if ($handler->isEnabled()) { - $result[] = array($executable, $id) + $result[] = array($executable, $id); } } }