? 243129-alternative-approach2.patch
? 395472-fix-test.patch
? 453254-29-upgrade.patch
? 508458
? 8389
? :
? Available updates | d7.7_1246954182040.png
? Unsaved Document 1
? after.png
? cache_get_multiple-333171-39.patch.2
? cache_shutdown.png
? comment.diff
? comment_contact.png
? comment_load_multiple.patch
? comment_load_multiple_3.patch
? comment_objects.patch
? comment_objects_0.patch
? comment_objects_0.patch.1
? comment_objects_no_search.patch
? comment_paging_24.patch.2
? comment_settings.patch
? comment_settings.png
? comment_settings_0_1.patch
? comment_settings_after.png
? comment_settings_before.png
? comments.png
? config.patch
? config.patch.1
? config.png
? config2.patch.txt
? config_0.patch
? config_2.patch
? config_2.patch.1
? config_3.patch
? config_5.patch
? content.png
? d6.sql
? d7-term-field_19.patch
? d7.sql
? d7ux_header_jun14.tar
? d7ux_overlay_03.patch
? db_placeholders_rip.patch
? diff.txt
? drupal_function_exists.png
? entity_loading-loader.patch
? entity_loading.patch
? entityloading_frh_9.patch
? field_ui-516138-24.patch
? fieldable_comments-504666-18.patch
? fieldable_comments-504666-20.patch
? fieldable_comments.patch
? fieldable_comments_0.patch
? fieldset.png
? filetransfer.patch
? filetransfer.patch.1
? filter-failing-tests_php.txt
? formatter_load.patch
? formatter_load.patch.1
? hook_field_formatter_load.patch
? less_useless.png
? link.png
? menu_rebuild_revert.patch
? missing.png
? modules (2)
? no-link.png
? no-placeholders.patch
? node_types_rebuild_0_0.patch
? notice.patch
? optional_registry.patch
? overlay.png
? page-top_2.diff
? page-top_2.patch
? php5.3youpickypickything.patch
? pointless.patch
? profile.patch
? registry.png
? search_index_content.patch
? search_index_content_4.patch
? search_index_content_5.patch
? semantic_but_ugly.png
? settings_with_anon.png
? simplynotthere.png
? umm.png
? uninstalled.patch
? updates-395474-86.patch
? useless.png
? webgrind-6.png
? webgrind-7.png
? works_for_me.patch
? misc/operations.js
? modules/comments_as_tab.patch
? modules/field_ui
? modules/overlay
? modules/comment/.comment.test.rej.swp
? modules/comment/comment_paging.patch
? modules/field/field.autoload.inc
? modules/node/.node.pages.inc.swp
? modules/system/system.actions.inc
? modules/system/system.autoload.inc
? modules/system/system.block.inc
? modules/system/system.build.inc
? modules/system/system.cron.inc
? modules/system/system.file.inc
? modules/system/system.form.inc
? modules/system/system.mail.inc
? modules/system/system.registry.inc
? modules/system/system.update
? modules/taxonomy/.taxonomy.module.swp
? modules/toolbar/no-placeholders.patch
? modules/update/update.admin.inc
? modules/update/update.js
? modules/user/user.autoload.inc
? scripts/generate-autoload.pl
? scripts/generate-autoload.sh
? sites/all/modules/contrib
? sites/default/files
? sites/default/settings.php
? sites/default/settings.php.back
Index: modules/block/block.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block.admin.inc,v
retrieving revision 1.45
diff -u -p -r1.45 block.admin.inc
--- modules/block/block.admin.inc	14 Jul 2009 10:22:17 -0000	1.45
+++ modules/block/block.admin.inc	15 Jul 2009 18:46:21 -0000
@@ -34,7 +34,7 @@ function block_admin_display_form(&$form
   $custom_theme = isset($theme) ? $theme : variable_get('theme_default', 'garland');
   drupal_theme_initialize();
 
-  $block_regions = system_region_list($theme_key) + array(BLOCK_REGION_NONE => '<' . t('none') . '>');
+  $block_regions = system_region_list($theme_key, REGIONS_VISIBLE) + array(BLOCK_REGION_NONE => '<' . t('none') . '>');
 
   // Weights range from -delta to +delta, so delta should be at least half
   // of the amount of blocks present. This makes sure all blocks in the same
@@ -469,7 +469,7 @@ function block_box_delete_submit($form, 
 function template_preprocess_block_admin_display_form(&$variables) {
   global $theme_key;
 
-  $block_regions = system_region_list($theme_key);
+  $block_regions = system_region_list($theme_key, REGIONS_VISIBLE);
   $variables['block_regions'] = $block_regions + array(BLOCK_REGION_NONE => t('Disabled'));
 
   foreach ($block_regions as $key => $value) {
Index: modules/block/block.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block.module,v
retrieving revision 1.349
diff -u -p -r1.349 block.module
--- modules/block/block.module	14 Jul 2009 10:22:17 -0000	1.349
+++ modules/block/block.module	15 Jul 2009 18:46:21 -0000
@@ -236,10 +236,11 @@ function block_page_alter($page) {
   drupal_theme_initialize();
 
   // Populate all block regions
-  $regions = system_region_list($theme);
+  $all_regions = system_region_list($theme);
+  $visible_regions = system_region_list($theme, REGIONS_VISIBLE);
 
   // Load all region content assigned via blocks.
-  foreach (array_keys($regions) as $region) {
+  foreach (array_keys($all_regions) as $region) {
     // Prevent left and right regions from rendering blocks when 'show_blocks' == FALSE.
     if (!empty($page['#show_blocks']) || ($region != 'left' && $region != 'right')) {
       // Assign blocks to region.
@@ -249,8 +250,8 @@ function block_page_alter($page) {
 
       // Append region description if we are rendering the block admin page.
       $item = menu_get_item();
-      if ($item['path'] == 'admin/build/block') {
-        $description = '<div class="block-region">' . $regions[$region] . '</div>';
+      if ($item['path'] == 'admin/build/block' && isset($visible_regions[$region])) {
+        $description = '<div class="block-region">' . $all_regions[$region] . '</div>';
         $page[$region]['block_description'] = array(
           '#markup' => $description,
           '#weight' => 15,
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.722
diff -u -p -r1.722 system.module
--- modules/system/system.module	5 Jul 2009 18:00:10 -0000	1.722
+++ modules/system/system.module	15 Jul 2009 18:46:25 -0000
@@ -72,6 +72,17 @@ define('DRUPAL_OPTIONAL', 1);
 define('DRUPAL_REQUIRED', 2);
 
 /**
+ * Return only visible regions. @see system_region_list().
+ */
+define('REGIONS_VISIBLE', 'visible');
+
+/**
+ * Return all visible regions. @see system_region_list().
+ */
+define('REGIONS_ALL', 'all');
+
+
+/**
  * Implement hook_help().
  */
 function system_help($path, $arg) {
@@ -1974,18 +1985,33 @@ function system_find_base_theme($themes,
  *
  * @param $theme_key
  *   The name of a theme.
+ * @param $show
+ *   Possible values: REGIONS_ALL or REGIONS_VISIBLE. Visible excludes hidden
+ *   regions.
  * @return
  *   An array of regions in the form $region['name'] = 'description'.
  */
-function system_region_list($theme_key) {
+function system_region_list($theme_key, $show = REGIONS_ALL) {
   $list = &drupal_static(__FUNCTION__, array());
 
-  if (!array_key_exists($theme_key, $list)) {
+  if (empty($list[$theme_key][$show])) {
     $info = unserialize(db_query("SELECT info FROM {system} WHERE type = :type AND name = :name", array(':type' => 'theme', ':name' => $theme_key))->fetchField());
-    $list[$theme_key] = array_map('t', $info['regions']);
+    // If requested, suppress hidden regions. @see block_admin_display_form().
+    foreach ($info['regions'] as $name => $label) {
+      if ($show == REGIONS_ALL || !isset($info['regions_hidden']) || !in_array($name, $info['regions_hidden'])) {
+        $list[$theme_key][$show][$name] = $label;
+      }
+    }
   }
+  return $list[$theme_key][$show];
+}
 
-  return $list[$theme_key];
+/**
+ * Implement hook_system_info_alter(). Remove page-top from the blocks UI 
+ * since toolbar.module populates it outside of blocks system.
+ */
+function system_system_info_alter(&$info, $file) {
+  $info['regions_hidden'][] = 'page_top';
 }
 
 /**
