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_load($name)
contributions/views/views_ui.module, line 230
Specialized menu callback to load a view either out of the cache or just load it.
<?php
function views_ui_cache_load($name) {
views_include('cache');
views_include('view');
$view = views_object_cache_get('view', $name);
if (empty($view)) {
$view = views_get_view($name);
if (!empty($view)) {
// Check to see if someone else is already editing this view.
global $user;
$view->locked = db_fetch_object(db_query("SELECT s.uid, v.updated FROM {views_object_cache} v INNER JOIN {sessions} s ON v.sid = s.sid WHERE s.sid != '%s' and v.name = '%s' and v.obj = 'view' ORDER BY v.updated ASC", session_id(), $view->name));
}
}
if (empty($view)) {
return FALSE;
}
else {
return $view;
}
}
?>