You are here

function views_ui_admin_clone_page in Views (for Drupal 7) 5

1 string reference to 'views_ui_admin_clone_page'
views_ui_add_menu_items in ./views_ui.module

File

./views_ui.module, line 486

Code

function views_ui_admin_clone_page($viewname) {
  views_load_cache();
  $op = $_POST['op'];
  if ($op == t('Cancel')) {
    drupal_goto('admin/build/views');
  }
  $view = views_get_view($viewname);
  if (!$view) {
    return drupal_not_found();
  }
  unset($view->vid);
  drupal_set_title(t('Add a View'));
  return drupal_get_form('views_edit_view', $view, $op);
}