summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-04-30 21:44:20 +0000
committerDries Buytaert <dries@buytaert.net>2009-04-30 21:44:20 +0000
commit5f08579bfe3b268d6a57fd50c16de861f72e02e7 (patch)
tree6fef5481becd1767dbf10e61a70b039ba764a2ef
parent3e81a14a4908aca99874484159e25dd88b8d3ecb (diff)
downloadbrdo-5f08579bfe3b268d6a57fd50c16de861f72e02e7.tar.gz
brdo-5f08579bfe3b268d6a57fd50c16de861f72e02e7.tar.bz2
- Patch #240873 by Gábor Hojtsy, sun: block system clean-ups. Thanks for the review sun.
-rw-r--r--CHANGELOG.txt2
-rw-r--r--modules/contact/contact.test2
-rw-r--r--modules/system/system.install12
-rw-r--r--modules/system/system.module15
-rw-r--r--modules/user/user.module6
-rw-r--r--profiles/default/default.profile10
-rw-r--r--profiles/expert/expert.profile8
7 files changed, 25 insertions, 30 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 0edb48226..88199e6d9 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -107,6 +107,8 @@ Drupal 7.0, xxxx-xx-xx (development version)
and allow custom data fields to be attached to itself.
* Provides a subset of the features of the Content Construction
Kit (CCK) module.
+- Page organization
+ * Made the help text area a full featured region with blocks.
- Upgraded the core JavaScript library to jQuery version 1.3.2.
- Upgraded the jQuery Forms library to 2.21.
diff --git a/modules/contact/contact.test b/modules/contact/contact.test
index ae5fbe1ec..ecac2db1a 100644
--- a/modules/contact/contact.test
+++ b/modules/contact/contact.test
@@ -80,7 +80,7 @@ class ContactSitewideTestCase extends DrupalWebTestCase {
$this->setPermission('anonymous user', array('access site-wide contact form' => TRUE));
$this->drupalLogout();
$this->drupalGet('contact');
- $this->assertText(t('Contact'), t('Contact form is shown when there is one category.'));
+ $this->assertText(t('Your e-mail address'), t('Contact form is shown when there is one category.'));
$this->assertNoText(t('Category'), t('When there is only one category, the category selection element is hidden.'));
$this->drupalLogin($admin_user);
diff --git a/modules/system/system.install b/modules/system/system.install
index 84f0eaa76..48dfd9b0e 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -3266,7 +3266,7 @@ function system_update_7021() {
foreach ($result as $theme) {
$themes_with_blocks[] = $theme->name;
// Add new system generated help block.
- $ret[] = update_sql("INSERT INTO {block} (module, delta, theme, status, weight, region, pages, cache) VALUES ('system', 'help', '". $theme->name ."', 1, 0, 'help', '', 1)");
+ $ret[] = update_sql("INSERT INTO {block} (module, delta, theme, status, weight, region, pages, cache) VALUES ('system', 'help', '" . $theme->name . "', 1, 0, 'help', '', 1)");
}
// Migrate contact form information and user register help to blocks.
@@ -3275,17 +3275,17 @@ function system_update_7021() {
db_insert('box')->fields(array('body' => $contact_help, 'info' => 'Contact page help', 'format' => FILTER_FORMAT_DEFAULT))->execute();
foreach ($themes_with_blocks as $theme) {
// Add contact help block for themes, which had blocks.
- $ret[] = update_sql("INSERT INTO {block} (module, delta, theme, status, weight, region, visibility, pages, cache) VALUES ('block', '". ($bid_max + 1) ."', '". $theme ."', 1, 5, 'help', 1, 'contact', -1)");
+ $ret[] = update_sql("INSERT INTO {block} (module, delta, theme, status, weight, region, visibility, pages, cache) VALUES ('block', '" . ($bid_max + 1) . "', '" . $theme . "', 1, 5, 'help', 1, 'contact', -1)");
}
- drupal_set_message('The contact form information setting was migrated to <a href="'. url('admin/build/block/configure/block/' . ($bid_max + 1)) . '">a custom block</a> and set up to only show on the site-wide contact page. The block was set to use the default text format, which might differ from the HTML based format used before. Please check the block and ensure that the output is right.');
+ drupal_set_message('The contact form information setting was migrated to <a href="' . url('admin/build/block/configure/block/' . ($bid_max + 1)) . '">a custom block</a> and set up to only show on the site-wide contact page. The block was set to use the default text format, which might differ from the HTML based format used before. Please check the block and ensure that the output is right.');
}
if ($user_help = variable_get('user_registration_help', '')) {
db_insert('box')->fields(array('body' => $user_help, 'info' => 'User registration guidelines', 'format' => FILTER_FORMAT_DEFAULT))->execute();
foreach ($themes_with_blocks as $theme) {
// Add user registration help block for themes, which had blocks.
- $ret[] = update_sql("INSERT INTO {block} (module, delta, theme, status, weight, region, visibility, pages, cache) VALUES ('block', '". ($bid_max + 2) ."', '". $theme ."', 1, 5, 'help', 1, 'user/register', -1)");
+ $ret[] = update_sql("INSERT INTO {block} (module, delta, theme, status, weight, region, visibility, pages, cache) VALUES ('block', '" . ($bid_max + 2) . "', '" . $theme . "', 1, 5, 'help', 1, 'user/register', -1)");
}
- drupal_set_message('The user registration guidelines were migrated to <a href="'. url('admin/build/block/configure/block/' . ($bid_max + 2)) . '">a custom block</a> and set up to only show on the user registration page. The block was set to use the default text format, which might differ from the HTML based format used before. Please check the block and ensure that the output is right.');
+ drupal_set_message('The user registration guidelines were migrated to <a href="' . url('admin/build/block/configure/block/' . ($bid_max + 2)) . '">a custom block</a> and set up to only show on the user registration page. The block was set to use the default text format, which might differ from the HTML based format used before. Please check the block and ensure that the output is right.');
}
// Remove the two variables (even if they were saved empty on the admin interface),
// to avoid keeping clutter in the variables table.
@@ -3293,7 +3293,7 @@ function system_update_7021() {
variable_del('user_registration_help');
// Rebuild theme data, so the new 'help' region is identified.
- system_theme_data();
+ _system_theme_data();
return $ret;
}
diff --git a/modules/system/system.module b/modules/system/system.module
index bf10db57a..98d1b2f00 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -892,12 +892,11 @@ function system_block_list() {
$blocks['powered-by'] = array(
'info' => t('Powered by Drupal'),
'weight' => '10',
- // Not worth caching.
'cache' => BLOCK_NO_CACHE,
);
$blocks['help'] = array(
- 'info' => t('System help'),
- 'weight' => '5',
+ 'info' => t('System help'),
+ 'weight' => '5',
);
// System-defined menu blocks.
foreach (menu_list_system_menus() as $menu_name => $title) {
@@ -960,17 +959,13 @@ function system_block_view($delta = '') {
switch ($delta) {
case 'powered-by':
$image_path = 'misc/' . variable_get('drupal_badge_color', 'powered-blue') . '-' . variable_get('drupal_badge_size', '80x15') . '.png';
- // Don't display a title.
$block['subject'] = NULL;
$block['content'] = theme('system_powered_by', $image_path);
return $block;
case 'help':
- return array(
- // Don't display a title.
- 'subject' => NULL,
- 'content' => menu_get_active_help(),
- );
- break;
+ $block['subject'] = NULL;
+ $block['content'] = menu_get_active_help();
+ return $block;
default:
// All system menu blocks.
$system_menus = menu_list_system_menus();
diff --git a/modules/user/user.module b/modules/user/user.module
index a59a7146d..29b43cb36 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -2851,10 +2851,8 @@ function user_register() {
drupal_goto('user/' . $user->uid);
}
- $form = array();
-
- // Merge in the default user edit fields.
- $form = array_merge($form, user_edit_form($form_state, NULL, NULL, TRUE));
+ // Start with the default user edit fields.
+ $form = user_edit_form($form_state, NULL, NULL, TRUE);
if ($admin) {
$form['account']['notify'] = array(
'#type' => 'checkbox',
diff --git a/profiles/default/default.profile b/profiles/default/default.profile
index ab7f1be56..0e7465c9d 100644
--- a/profiles/default/default.profile
+++ b/profiles/default/default.profile
@@ -101,7 +101,7 @@ function default_profile_tasks(&$task, $url) {
'weight' => 0,
'region' => 'left',
'pages' => '',
- 'cache' => -1
+ 'cache' => -1,
),
array(
'module' => 'system',
@@ -111,7 +111,7 @@ function default_profile_tasks(&$task, $url) {
'weight' => 0,
'region' => 'left',
'pages' => '',
- 'cache' => -1
+ 'cache' => -1,
),
array(
'module' => 'system',
@@ -121,7 +121,7 @@ function default_profile_tasks(&$task, $url) {
'weight' => 1,
'region' => 'left',
'pages' => '',
- 'cache' => -1
+ 'cache' => -1,
),
array(
'module' => 'system',
@@ -131,7 +131,7 @@ function default_profile_tasks(&$task, $url) {
'weight' => 10,
'region' => 'footer',
'pages' => '',
- 'cache' => -1
+ 'cache' => -1,
),
array(
'module' => 'system',
@@ -141,7 +141,7 @@ function default_profile_tasks(&$task, $url) {
'weight' => 0,
'region' => 'help',
'pages' => '',
- 'cache' => -1
+ 'cache' => -1,
),
);
$query = db_insert('block')->fields(array('module', 'delta', 'theme', 'status', 'weight', 'region', 'pages', 'cache'));
diff --git a/profiles/expert/expert.profile b/profiles/expert/expert.profile
index b78fd1241..fdf22f47b 100644
--- a/profiles/expert/expert.profile
+++ b/profiles/expert/expert.profile
@@ -52,7 +52,7 @@ function expert_profile_tasks(&$task, $url) {
'weight' => 0,
'region' => 'left',
'pages' => '',
- 'cache' => -1
+ 'cache' => -1,
),
array(
'module' => 'system',
@@ -62,7 +62,7 @@ function expert_profile_tasks(&$task, $url) {
'weight' => 0,
'region' => 'left',
'pages' => '',
- 'cache' => -1
+ 'cache' => -1,
),
array(
'module' => 'system',
@@ -72,7 +72,7 @@ function expert_profile_tasks(&$task, $url) {
'weight' => 1,
'region' => 'left',
'pages' => '',
- 'cache' => -1
+ 'cache' => -1,
),
array(
'module' => 'system',
@@ -82,7 +82,7 @@ function expert_profile_tasks(&$task, $url) {
'weight' => 0,
'region' => 'help',
'pages' => '',
- 'cache' => -1
+ 'cache' => -1,
),
);
$query = db_insert('block')->fields(array('module', 'delta', 'theme', 'status', 'weight', 'region', 'pages', 'cache'));