Index: modules/blog/blog.module =================================================================== RCS file: /cvs/drupal/drupal/modules/blog/blog.module,v retrieving revision 1.299 diff -u -p -r1.299 blog.module --- modules/blog/blog.module 20 Feb 2008 13:46:38 -0000 1.299 +++ modules/blog/blog.module 11 Mar 2008 01:21:33 -0000 @@ -175,7 +175,7 @@ function blog_menu() { function blog_block($op = 'list', $delta = 0) { global $user; if ($op == 'list') { - $block[0]['info'] = t('Recent blog posts'); + $block['recent']['info'] = t('Recent blog posts'); return $block; } else if ($op == 'view') { Index: modules/book/book.module =================================================================== RCS file: /cvs/drupal/drupal/modules/book/book.module,v retrieving revision 1.457 diff -u -p -r1.457 book.module --- modules/book/book.module 20 Feb 2008 13:46:39 -0000 1.457 +++ modules/book/book.module 11 Mar 2008 01:21:34 -0000 @@ -182,8 +182,8 @@ function book_block($op = 'list', $delta $block = array(); switch ($op) { case 'list': - $block[0]['info'] = t('Book navigation'); - $block[0]['cache'] = BLOCK_CACHE_PER_PAGE | BLOCK_CACHE_PER_ROLE; + $block['navigation']['info'] = t('Book navigation'); + $block['navigation']['cache'] = BLOCK_CACHE_PER_PAGE | BLOCK_CACHE_PER_ROLE; return $block; case 'view': $current_bid = 0; Index: modules/comment/comment.module =================================================================== RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v retrieving revision 1.621 diff -u -p -r1.621 comment.module --- modules/comment/comment.module 23 Feb 2008 08:02:48 -0000 1.621 +++ modules/comment/comment.module 11 Mar 2008 01:21:36 -0000 @@ -287,7 +287,7 @@ function comment_perm() { function comment_block($op = 'list', $delta = 0, $edit = array()) { switch ($op) { case 'list': - $blocks[0]['info'] = t('Recent comments'); + $blocks['recent']['info'] = t('Recent comments'); return $blocks; case 'configure': Index: modules/locale/locale.module =================================================================== RCS file: /cvs/drupal/drupal/modules/locale/locale.module,v retrieving revision 1.214 diff -u -p -r1.214 locale.module --- modules/locale/locale.module 20 Feb 2008 13:46:39 -0000 1.214 +++ modules/locale/locale.module 11 Mar 2008 01:21:39 -0000 @@ -558,9 +558,9 @@ function locale_update_js_files() { */ function locale_block($op = 'list', $delta = 0) { if ($op == 'list') { - $block[0]['info'] = t('Language switcher'); + $block['language-switcher']['info'] = t('Language switcher'); // Not worth caching. - $block[0]['cache'] = BLOCK_NO_CACHE; + $block['language-switcher']['cache'] = BLOCK_NO_CACHE; return $block; } Index: modules/node/node.module =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.module,v retrieving revision 1.950 diff -u -p -r1.950 node.module --- modules/node/node.module 20 Feb 2008 13:46:40 -0000 1.950 +++ modules/node/node.module 11 Mar 2008 01:21:42 -0000 @@ -1609,9 +1609,9 @@ function node_revision_list($node) { */ function node_block($op = 'list', $delta = 0) { if ($op == 'list') { - $blocks[0]['info'] = t('Syndicate'); + $blocks['syndicate']['info'] = t('Syndicate'); // Not worth caching. - $blocks[0]['cache'] = BLOCK_NO_CACHE; + $blocks['syndicate']['cache'] = BLOCK_NO_CACHE; return $blocks; } else if ($op == 'view') { Index: modules/poll/poll.module =================================================================== RCS file: /cvs/drupal/drupal/modules/poll/poll.module,v retrieving revision 1.264 diff -u -p -r1.264 poll.module --- modules/poll/poll.module 20 Feb 2008 13:46:40 -0000 1.264 +++ modules/poll/poll.module 11 Mar 2008 01:21:44 -0000 @@ -137,7 +137,7 @@ function _poll_menu_access($node, $perm, function poll_block($op = 'list', $delta = 0) { if (user_access('access content')) { if ($op == 'list') { - $blocks[0]['info'] = t('Most recent poll'); + $blocks['recent']['info'] = t('Most recent poll'); return $blocks; } else if ($op == 'view') { Index: modules/profile/profile.module =================================================================== RCS file: /cvs/drupal/drupal/modules/profile/profile.module,v retrieving revision 1.236 diff -u -p -r1.236 profile.module --- modules/profile/profile.module 3 Feb 2008 19:36:46 -0000 1.236 +++ modules/profile/profile.module 11 Mar 2008 01:21:45 -0000 @@ -134,11 +134,11 @@ function profile_menu() { function profile_block($op = 'list', $delta = 0, $edit = array()) { if ($op == 'list') { - $blocks[0]['info'] = t('Author information'); - $blocks[0]['cache'] = BLOCK_CACHE_PER_PAGE | BLOCK_CACHE_PER_ROLE; + $blocks['author-information']['info'] = t('Author information'); + $blocks['author-information']['cache'] = BLOCK_CACHE_PER_PAGE | BLOCK_CACHE_PER_ROLE; return $blocks; } - else if ($op == 'configure' && $delta == 0) { + else if ($op == 'configure') { // Compile a list of fields to show $fields = array(); $result = db_query('SELECT name, title, weight, visibility FROM {profile_fields} WHERE visibility IN (%d, %d) ORDER BY weight', PROFILE_PUBLIC, PROFILE_PUBLIC_LISTINGS); @@ -146,7 +146,8 @@ function profile_block($op = 'list', $de $fields[$record->name] = check_plain($record->title); } $fields['user_profile'] = t('Link to full user profile'); - $form['profile_block_author_fields'] = array('#type' => 'checkboxes', + $form['profile_block_author_fields'] = array( + '#type' => 'checkboxes', '#title' => t('Profile fields to display'), '#default_value' => variable_get('profile_block_author_fields', NULL), '#options' => $fields, @@ -154,7 +155,7 @@ function profile_block($op = 'list', $de ); return $form; } - else if ($op == 'save' && $delta == 0) { + else if ($op == 'save') { variable_set('profile_block_author_fields', $edit['profile_block_author_fields']); } else if ($op == 'view') { Index: modules/search/search.module =================================================================== RCS file: /cvs/drupal/drupal/modules/search/search.module,v retrieving revision 1.251 diff -u -p -r1.251 search.module --- modules/search/search.module 20 Feb 2008 13:46:40 -0000 1.251 +++ modules/search/search.module 11 Mar 2008 01:21:46 -0000 @@ -153,9 +153,9 @@ function search_perm() { */ function search_block($op = 'list', $delta = 0) { if ($op == 'list') { - $blocks[0]['info'] = t('Search form'); + $blocks['form']['info'] = t('Search form'); // Not worth caching. - $blocks[0]['cache'] = BLOCK_NO_CACHE; + $blocks['form']['cache'] = BLOCK_NO_CACHE; return $blocks; } else if ($op == 'view' && user_access('search content')) { Index: modules/statistics/statistics.module =================================================================== RCS file: /cvs/drupal/drupal/modules/statistics/statistics.module,v retrieving revision 1.273 diff -u -p -r1.273 statistics.module --- modules/statistics/statistics.module 20 Feb 2008 13:46:40 -0000 1.273 +++ modules/statistics/statistics.module 11 Mar 2008 01:21:46 -0000 @@ -246,9 +246,9 @@ function statistics_block($op = 'list', switch ($op) { case 'list': if (variable_get('statistics_count_content_views', 0)) { - $blocks[0]['info'] = t('Popular content'); + $blocks['popular']['info'] = t('Popular content'); // Too dynamic to cache. - $blocks[0]['cache'] = BLOCK_NO_CACHE; + $blocks['popular']['cache'] = BLOCK_NO_CACHE; return $blocks; } break; Index: modules/system/block.tpl.php =================================================================== RCS file: /cvs/drupal/drupal/modules/system/block.tpl.php,v retrieving revision 1.4 diff -u -p -r1.4 block.tpl.php --- modules/system/block.tpl.php 1 Sep 2007 05:42:48 -0000 1.4 +++ modules/system/block.tpl.php 11 Mar 2008 01:21:46 -0000 @@ -10,7 +10,7 @@ * - $block->subject: Block title. * - $block->content: Block content. * - $block->module: Module that generated the block. - * - $block->delta: This is a numeric id connected to each module. + * - $block->delta: An ID for the block, unique within each module. * - $block->region: The block region embedding the current block. * * Helper variables: Index: modules/system/system.install =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.install,v retrieving revision 1.240 diff -u -p -r1.240 system.install --- modules/system/system.install 23 Feb 2008 08:13:09 -0000 1.240 +++ modules/system/system.install 11 Mar 2008 01:21:50 -0000 @@ -371,9 +371,9 @@ function system_install() { db_query("INSERT INTO {variable} (name, value) VALUES ('%s', '%s')", 'theme_default', 's:7:"garland";'); db_query("UPDATE {system} SET status = %d WHERE type = '%s' AND name = '%s'", 1, 'theme', 'garland'); - db_query("INSERT INTO {blocks} (module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)", 'user', '0', 'garland', 1, 0, 'left', '', -1); - db_query("INSERT INTO {blocks} (module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)", 'user', '1', 'garland', 1, 0, 'left', '', -1); - db_query("INSERT INTO {blocks} (module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)", 'system', '0', 'garland', 1, 10, 'footer', '', -1); + db_query("INSERT INTO {blocks} (module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)", 'user', 'login', 'garland', 1, 0, 'left', '', -1); + db_query("INSERT INTO {blocks} (module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)", 'user', 'navigation', 'garland', 1, 0, 'left', '', -1); + db_query("INSERT INTO {blocks} (module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)", 'system', 'powered-by', 'garland', 1, 10, 'footer', '', -1); db_query("INSERT INTO {node_access} (nid, gid, realm, grant_view, grant_update, grant_delete) VALUES (%d, %d, '%s', %d, %d, %d)", 0, 0, 'all', 1, 0, 0); Index: modules/system/system.module =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.module,v retrieving revision 1.592 diff -u -p -r1.592 system.module --- modules/system/system.module 20 Feb 2008 13:46:41 -0000 1.592 +++ modules/system/system.module 11 Mar 2008 01:21:51 -0000 @@ -580,7 +580,7 @@ function system_user($type, $edit, &$use function system_block($op = 'list', $delta = 0, $edit = NULL) { switch ($op) { case 'list': - $blocks[0] = array( + $blocks['powered-by'] = array( 'info' => t('Powered by Drupal'), 'weight' => '10', // Not worth caching. Index: modules/user/user.module =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.module,v retrieving revision 1.896 diff -u -p -r1.896 user.module --- modules/user/user.module 20 Feb 2008 13:46:43 -0000 1.896 +++ modules/user/user.module 11 Mar 2008 01:21:57 -0000 @@ -633,23 +633,23 @@ function user_block($op = 'list', $delta global $user; if ($op == 'list') { - $blocks[0]['info'] = t('User login'); + $blocks['login']['info'] = t('User login'); // Not worth caching. - $blocks[0]['cache'] = BLOCK_NO_CACHE; + $blocks['login']['cache'] = BLOCK_NO_CACHE; - $blocks[1]['info'] = t('Navigation'); + $blocks['navigation']['info'] = t('Navigation'); // Menu blocks can't be cached because each menu item can have // a custom access callback. menu.inc manages its own caching. - $blocks[1]['cache'] = BLOCK_NO_CACHE; + $blocks['navigation']['cache'] = BLOCK_NO_CACHE; - $blocks[2]['info'] = t('Who\'s new'); + $blocks['new']['info'] = t('Who\'s new'); // Too dynamic to cache. - $blocks[3]['info'] = t('Who\'s online'); - $blocks[3]['cache'] = BLOCK_NO_CACHE; + $blocks['online']['info'] = t('Who\'s online'); + $blocks['online']['cache'] = BLOCK_NO_CACHE; return $blocks; } - else if ($op == 'configure' && $delta == 2) { + else if ($op == 'configure' && $delta == 'new') { $form['user_block_whois_new_count'] = array( '#type' => 'select', '#title' => t('Number of users to display'), @@ -658,17 +658,17 @@ function user_block($op = 'list', $delta ); return $form; } - else if ($op == 'configure' && $delta == 3) { + else if ($op == 'configure' && $delta == 'online') { $period = drupal_map_assoc(array(30, 60, 120, 180, 300, 600, 900, 1800, 2700, 3600, 5400, 7200, 10800, 21600, 43200, 86400), 'format_interval'); $form['user_block_seconds_online'] = array('#type' => 'select', '#title' => t('User activity'), '#default_value' => variable_get('user_block_seconds_online', 900), '#options' => $period, '#description' => t('A user is considered online for this long after they have last viewed a page.')); $form['user_block_max_list_count'] = array('#type' => 'select', '#title' => t('User list length'), '#default_value' => variable_get('user_block_max_list_count', 10), '#options' => drupal_map_assoc(array(0, 5, 10, 15, 20, 25, 30, 40, 50, 75, 100)), '#description' => t('Maximum number of currently online users to display.')); return $form; } - else if ($op == 'save' && $delta == 2) { + else if ($op == 'save' && $delta == 'new') { variable_set('user_block_whois_new_count', $edit['user_block_whois_new_count']); } - else if ($op == 'save' && $delta == 3) { + else if ($op == 'save' && $delta == 'online') { variable_set('user_block_seconds_online', $edit['user_block_seconds_online']); variable_set('user_block_max_list_count', $edit['user_block_max_list_count']); } @@ -676,7 +676,7 @@ function user_block($op = 'list', $delta $block = array(); switch ($delta) { - case 0: + case 'login': // For usability's sake, avoid showing two login forms on one page. if (!$user->uid && !(arg(0) == 'user' && !is_numeric(arg(1)))) { @@ -685,14 +685,14 @@ function user_block($op = 'list', $delta } return $block; - case 1: + case 'navigation': if ($menu = menu_tree()) { $block['subject'] = $user->uid ? check_plain($user->name) : t('Navigation'); $block['content'] = $menu; } return $block; - case 2: + case 'new': if (user_access('access content')) { // Retrieve a list of new users who have subsequently accessed the site successfully. $result = db_query_range('SELECT uid, name FROM {users} WHERE status != 0 AND access != 0 ORDER BY created DESC', 0, variable_get('user_block_whois_new_count', 5)); @@ -706,7 +706,7 @@ function user_block($op = 'list', $delta } return $block; - case 3: + case 'online': if (user_access('access content')) { // Count users active within the defined period. $interval = time() - variable_get('user_block_seconds_online', 900); Index: themes/garland/style-rtl.css =================================================================== RCS file: /cvs/drupal/drupal/themes/garland/style-rtl.css,v retrieving revision 1.7 diff -u -p -r1.7 style-rtl.css --- themes/garland/style-rtl.css 10 Mar 2008 18:23:07 -0000 1.7 +++ themes/garland/style-rtl.css 11 Mar 2008 01:21:59 -0000 @@ -226,17 +226,17 @@ html.js fieldset.collapsed legend a { /** * Syndication Block */ -#block-node-0 h2 { +#block-node-syndicate h2 { float: right; padding-right: 0; padding-left: 20px; } -#block-node-0 img { +#block-node-syndicate img { float: left; } -#block-node-0 .content { +#block-node-syndicate .content { clear: left; } Index: themes/garland/style.css =================================================================== RCS file: /cvs/drupal/drupal/themes/garland/style.css,v retrieving revision 1.39 diff -u -p -r1.39 style.css --- themes/garland/style.css 10 Mar 2008 18:23:07 -0000 1.39 +++ themes/garland/style.css 11 Mar 2008 01:21:59 -0000 @@ -877,17 +877,17 @@ html.js fieldset.collapsed legend a { /** * Syndication icons and block */ -#block-node-0 h2 { +#block-node-syndicate h2 { float: left; /* LTR */ padding-right: 20px; /* LTR */ } -#block-node-0 img, .feed-icon { +#block-node-syndicate img, .feed-icon { float: right; /* LTR */ padding-top: 4px; } -#block-node-0 .content { +#block-node-syndicate .content { clear: right; /* LTR */ }