function views_ui_admin_import_submit in Views (for Drupal 7) 5
File
- ./
views_ui.module, line 425
Code
function views_ui_admin_import_submit($formid, $form) {
views_load_cache();
ob_start();
eval($form['view']);
ob_end_clean();
$tables = array_keys(_views_get_tables());
if (isset($view)) {
if (!is_array($view->requires) || !array_diff($view->requires, $tables)) {
views_sanitize_view($view);
drupal_set_title(t('Add a View'));
$output = drupal_get_form('views_edit_view', $view, NULL);
print theme('page', $output);
exit;
}
else {
drupal_set_message(t("You don't seem to have the following requirements: ") . implode(', ', array_diff($view->requires, $tables)));
}
}
else {
drupal_set_message(t('Unable to get a view out of that.'));
}
}