Calling all Drupal developers!
Help us get this on the first page of Digg. DIGG NOW!
Help us get this on the first page of Digg. DIGG NOW!
views_ui_cache_set(&$view)
contributions/views/views_ui.module, line 262
Specialized cache function to add a flag to our view, include an appropriate include, and cache more easily.
<?php
function views_ui_cache_set(&$view) {
if (!empty($view->locked)) {
drupal_set_message(t('Changes cannot be made to a locked view.'), 'error');
return;
}
views_include('cache');
$view->changed = TRUE; // let any future object know that this view has changed.
// Unset handlers; we don't want to write these into the cache
unset($view->display_handler);
unset($view->current_display);
unset($view->default_display);
foreach (array_keys($view->display) as $id) {
unset($view->display[$id]->handler);
unset($view->display[$id]->default_display);
}
views_object_cache_set('view', $view->name, $view);
}
?>