Commit 51acc29b authored by damiankloip's avatar damiankloip Committed by tim.plunkett
Browse files

Issue #1513126 by damiankloip | mstrelan: Enabling a default view via CTools...

Issue #1513126 by damiankloip | mstrelan: Enabling a default view via CTools export UI requires a menu rebuild.
parent 76d77f94
...@@ -114,6 +114,7 @@ function views_schema_6000() { ...@@ -114,6 +114,7 @@ function views_schema_6000() {
'save callback' => 'views_save_view', 'save callback' => 'views_save_view',
'delete callback' => 'views_delete_view', 'delete callback' => 'views_delete_view',
'export callback' => 'views_export_view', 'export callback' => 'views_export_view',
'status callback' => 'views_export_status',
'cache defaults' => TRUE, 'cache defaults' => TRUE,
'default cache bin' => 'cache_views', 'default cache bin' => 'cache_views',
), ),
......
...@@ -1613,6 +1613,16 @@ function views_export_view(&$view, $indent = '') { ...@@ -1613,6 +1613,16 @@ function views_export_view(&$view, $indent = '') {
return $view->export($indent); return $view->export($indent);
} }
/**
* Export callback to change view status.
*/
function views_export_status($view, $status) {
ctools_export_set_object_status($view, $status);
views_invalidate_cache();
// Set the menu to be rebuilt.
variable_set('menu_rebuild_needed', TRUE);
}
// ------------------------------------------------------------------ // ------------------------------------------------------------------
// Views debug helper functions // Views debug helper functions
......
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