? remove_main_block_visilibity.687686.7.patch
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.878
diff -u -p -r1.878 system.module
--- modules/system/system.module	18 Jan 2010 17:08:20 -0000	1.878
+++ modules/system/system.module	21 Jan 2010 18:07:09 -0000
@@ -1765,6 +1765,27 @@ function system_init() {
 /**
  * Implements hook_form_FORM_ID_alter().
  */
+function system_form_block_admin_configure_alter(&$form, &$form_state) {
+  // Changing the visibility of the main content block has no effect,
+  // so we hide that section of the form to avoid confusion.
+  if ($form['module']['#value'] == 'system' && $form['delta']['#value'] == 'main') {
+    unset($form['visibility_title']);
+    $form['visibility']['#type'] = 'value';
+    $form['visibility']['path']['#type'] = 'value';
+    $form['visibility']['path']['visibility']['#type'] = 'value';
+    $form['visibility']['path']['pages']['#type'] = 'value';
+    $form['visibility']['role']['#type'] = 'value';
+    $form['visibility']['role']['roles']['#type'] = 'value';
+    $form['visibility']['user']['#type'] = 'value';
+    $form['visibility']['user']['custom']['#type'] = 'value';
+    $form['visibility']['node_type']['#type'] = 'value';
+    $form['visibility']['node_type']['types']['#type'] = 'value';
+  }
+}
+
+/**
+ * Implements hook_form_FORM_ID_alter().
+ */
 function system_form_user_profile_form_alter(&$form, &$form_state) {
   if ($form['#user_category'] == 'account') {
     if (variable_get('configurable_timezones', 1)) {
