Don't use the CTools export cruds anymore but directly use the entity system.

8.0.x
Daniel Wehner 2012-08-27 17:20:01 +02:00 committed by Tim Plunkett
parent ea3e288d53
commit 77038453e8
1 changed files with 2 additions and 10 deletions

View File

@ -1742,17 +1742,9 @@ function views_view_is_disabled($view) {
* A reference to the $view object. Use $reset if you're sure you want
* a fresh one.
*/
function views_get_view($name, $reset = FALSE) {
if ($reset) {
$cache = &drupal_static('ctools_export_load_object');
if (isset($cache['views_view'][$name])) {
unset($cache['views_view'][$name]);
}
}
function views_get_view($name) {
// @todo replace with http://drupal.org/node/1741154.
ctools_include('export');
$view = ctools_export_crud_load('views_view', $name);
$view = entity_load('view', $name);
if ($view) {
$view->update();
return $view->clone_view();