Commit 80e4c781 authored by damiankloip's avatar damiankloip Committed by tim.plunkett

Issue #1791070 by damiankloip: Fixed Disabled views get enabled when saving through the UI.

parent ccc66002
...@@ -55,6 +55,15 @@ function testDefaultViews() { ...@@ -55,6 +55,15 @@ function testDefaultViews() {
$this->assertResponse(200); $this->assertResponse(200);
$this->assertText($new_title); $this->assertText($new_title);
// Save another view in the UI.
$this->drupalPost('admin/structure/views/nojs/display/archive/page/title', array(), t('Apply'));
$this->drupalPost('admin/structure/views/view/archive/page', array(), t('Save'));
// Check there is an enable link. i.e. The view has not been enabled after
// editing.
$this->drupalGet('admin/structure/views');
$this->assertLinkByHref('admin/structure/views/view/archive/enable');
// It should now be possible to revert the view. Do that, and make sure the // It should now be possible to revert the view. Do that, and make sure the
// view title we added above no longer is displayed. // view title we added above no longer is displayed.
// $this->drupalGet('admin/structure/views'); // $this->drupalGet('admin/structure/views');
......
...@@ -308,7 +308,7 @@ function views_ui_cache_load($name) { ...@@ -308,7 +308,7 @@ function views_ui_cache_load($name) {
else { else {
// Keep disabled/enabled status real. // Keep disabled/enabled status real.
if ($original_view) { if ($original_view) {
$view->disabled = !empty($original_view->disabled); $view->disabled = $original_view->disabled;
} }
} }
......
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