From 9d3e859336739a8e0e92f0780fa857284c0b119d Mon Sep 17 00:00:00 2001
From: dereine <dereine@99340.no-reply.drupal.org>
Date: Thu, 4 Oct 2012 19:58:29 +0200
Subject: [PATCH] Issue #1802966 by dawehner: Replace ->disabled by not
 isEnabled().

---
 lib/Drupal/views/ViewExecutable.php | 2 +-
 views.module                        | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/Drupal/views/ViewExecutable.php b/lib/Drupal/views/ViewExecutable.php
index abae7c498c44..f3abf4466b4f 100644
--- a/lib/Drupal/views/ViewExecutable.php
+++ b/lib/Drupal/views/ViewExecutable.php
@@ -1522,7 +1522,7 @@ public function executeHookBlockList($display_id = NULL) {
    */
   public function access($displays = NULL, $account = NULL) {
     // Noone should have access to disabled views.
-    if (!empty($this->storage->disabled)) {
+    if (!$this->storage->isEnabled()) {
       return FALSE;
     }
 
diff --git a/views.module b/views.module
index 77206bb2ce70..aad0d9357eda 100644
--- a/views.module
+++ b/views.module
@@ -721,7 +721,7 @@ function views_block_info() {
   $views = views_get_all_views();
   foreach ($views as $view) {
     // disabled views get nothing.
-    if (!empty($view->disabled)) {
+    if (!$view->isEnabled()) {
       continue;
     }
 
@@ -1543,7 +1543,7 @@ function views_get_applicable_views($type) {
 
   foreach ($views as $view) {
     // Skip disabled views.
-    if (!empty($view->disabled)) {
+    if (!$view->isEnabled()) {
       continue;
     }
 
-- 
GitLab