You are here

function views_ui_break_lock_confirm in Views (for Drupal 7) 6.3

Same name and namespace in other branches
  1. 8.3 views_ui/admin.inc \views_ui_break_lock_confirm()
  2. 6.2 includes/admin.inc \views_ui_break_lock_confirm()
  3. 7.3 includes/admin.inc \views_ui_break_lock_confirm()

Page to delete a view.

1 string reference to 'views_ui_break_lock_confirm'
views_ui_menu in ./views_ui.module

File

includes/admin.inc, line 730
admin.inc Provides the Views' administrative interface.

Code

function views_ui_break_lock_confirm(&$form_state, $view) {
  $form_state['view'] =& $view;
  $form = array();
  if (empty($view->locked)) {
    return t('There is no lock on view %view to break.', array(
      '%name' => $view->name,
    ));
  }
  $cancel = 'admin/build/views/edit/' . $view->name;
  $account = user_load($view->locked->uid);
  return confirm_form($form, t('Are you sure you want to break the lock on view %name?', array(
    '%name' => $view->name,
  )), $cancel, t('By breaking this lock, any unsaved changes made by !user will be lost!', array(
    '!user' => theme('username', $account),
  )), t('Break lock'), t('Cancel'));
}