diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php index 21f7716..3bbf1ed 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php @@ -96,7 +96,7 @@ public function set($property_name, $value, $langcode = NULL) { } /** - * Implements Drupal\Core\Config\Entity\ConfigEntityInterface::enable(). + * Implements \Drupal\Core\Config\Entity\ConfigEntityInterface::enable(). */ public function enable() { $this->status = TRUE; @@ -104,7 +104,7 @@ public function enable() { } /** - * Implements Drupal\Core\Config\Entity\ConfigEntityInterface::disable(). + * Implements \Drupal\Core\Config\Entity\ConfigEntityInterface::disable(). */ public function disable() { $this->status = FALSE; @@ -112,7 +112,7 @@ public function disable() { } /** - * Implements Drupal\Core\Config\Entity\ConfigEntityInterface::status(). + * Implements \Drupal\Core\Config\Entity\ConfigEntityInterface::status(). */ public function status() { return !empty($this->status); diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityListController.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityListController.php index c2e204b..fbb10c0 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityListController.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityListController.php @@ -25,7 +25,7 @@ public function load() { } /** - * Overrides Drupal\Core\Entity\EntityListController::getOperations(); + * Overrides \Drupal\Core\Entity\EntityListController::getOperations(); */ public function getOperations(EntityInterface $entity) { $operations = parent::getOperations($entity); diff --git a/core/modules/block/block.module b/core/modules/block/block.module index 727a0f0..8bf4aae 100644 --- a/core/modules/block/block.module +++ b/core/modules/block/block.module @@ -373,9 +373,10 @@ function _block_rehash($theme = NULL) { // need to move the block to another region. $block->disable()->save(); } - // Set region to none if not enabled and make sure status is set. - if (empty($status)) { + // Set region to none if not enabled. + if (!$status) { $block->set('region', BLOCK_REGION_NONE); + $block->save(); } } return $blocks; diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigEntityStatusTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityStatusTest.php index 110b57c..5519de5 100644 --- a/core/modules/config/lib/Drupal/config/Tests/ConfigEntityStatusTest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityStatusTest.php @@ -2,12 +2,11 @@ /** * @file - * Contains Drupal\config\Tests\ConfigEntityStatusTest. + * Contains \Drupal\config\Tests\ConfigEntityStatusTest. */ namespace Drupal\config\Tests; -use Drupal\Core\Entity\EntityMalformedException; use Drupal\simpletest\DrupalUnitTestBase; /** @@ -31,7 +30,7 @@ public static function getInfo() { } /** - * Test the enabling/disabling of entities. + * Tests the enabling/disabling of entities. */ function testCRUD() { $entity = entity_create('config_test', array( diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigEntityStatusUITest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityStatusUITest.php index 036f6bf..d33998d 100644 --- a/core/modules/config/lib/Drupal/config/Tests/ConfigEntityStatusUITest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityStatusUITest.php @@ -2,7 +2,7 @@ /** * @file - * Contains Drupal\config\Tests\ConfigEntityStatusUITest. + * Contains \Drupal\config\Tests\ConfigEntityStatusUITest. */ namespace Drupal\config\Tests; diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module index 607ff64..dfb5d68 100644 --- a/core/modules/filter/filter.module +++ b/core/modules/filter/filter.module @@ -480,7 +480,7 @@ function filter_get_filter_types_by_format($format_id) { // Ignore filters that are disabled. $filters = array_filter($filters, function($filter) { - return !empty($filter->status); + return $filter->status; }); $filters_info = filter_get_filters(); diff --git a/core/modules/views/views_ui/lib/Drupal/views_ui/ViewListController.php b/core/modules/views/views_ui/lib/Drupal/views_ui/ViewListController.php index c3ee49d..af09c37 100644 --- a/core/modules/views/views_ui/lib/Drupal/views_ui/ViewListController.php +++ b/core/modules/views/views_ui/lib/Drupal/views_ui/ViewListController.php @@ -82,52 +82,14 @@ public function buildHeader() { } /** - * Implements Drupal\Core\Entity\EntityListController::getOperations(). - * - * @todo Obsolete after extending from ConfigEntityListController. + * Implements \Drupal\Core\Entity\EntityListController::getOperations(). */ public function getOperations(EntityInterface $view) { + $definition = parent::getOperations($view); + $uri = $view->uri(); $path = $uri['path']; - $definition['edit'] = array( - 'title' => t('Edit'), - 'href' => "$path/edit", - 'weight' => -5, - ); - if (!$view->status()) { - $definition['enable'] = array( - 'title' => t('Enable'), - 'ajax' => TRUE, - 'token' => TRUE, - 'href' => "$path/enable", - 'weight' => -10, - ); - } - else { - $definition['disable'] = array( - 'title' => t('Disable'), - 'ajax' => TRUE, - 'token' => TRUE, - 'href' => "$path/disable", - 'weight' => 0, - ); - } - // This property doesn't exist yet. - if (!empty($view->overridden)) { - $definition['revert'] = array( - 'title' => t('Revert'), - 'href' => "$path/revert", - 'weight' => 5, - ); - } - else { - $definition['delete'] = array( - 'title' => t('Delete'), - 'href' => "$path/delete", - 'weight' => 10, - ); - } $definition['clone'] = array( 'title' => t('Clone'), 'href' => "$path/clone",