#1342216 by dereine: Fix lock form if the view is not locked
authorDaniel Wehner
Wed, 14 Dec 2011 23:37:36 +0000 (00:37 +0100)
committerDaniel Wehner
Wed, 14 Dec 2011 23:37:36 +0000 (00:37 +0100)
includes/admin.inc

index 08f1740..55adb5b 100644 (file)
@@ -843,7 +843,8 @@ function views_ui_break_lock_confirm($form, &$form_state, $view) {
   $form = array();
 
   if (empty($view->locked)) {
-    return t('There is no lock on view %view to break.', array('%name' => $view->name));
+    $form['#markup'] = t('There is no lock on view %view to break.', array('%name' => $view->name));
+    return $form;
   }
 
   $cancel = 'admin/structure/views/view/' . $view->name . '/edit';