Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.471
diff -u -p -r1.471 theme.inc
--- includes/theme.inc 4 Apr 2009 00:58:09 -0000 1.471
+++ includes/theme.inc 9 Apr 2009 12:12:41 -0000
@@ -1232,17 +1232,6 @@ function theme_breadcrumb($breadcrumb) {
}
/**
- * Return a themed help message.
- *
- * @return a string containing the helptext for the current page.
- */
-function theme_help() {
- if ($help = menu_get_active_help()) {
- return '
' . $help . '
';
- }
-}
-
-/**
* Return a themed submenu, typically displayed under the tabs.
*
* @param $links
@@ -1866,7 +1855,6 @@ function template_preprocess_page(&$vari
$variables['feed_icons'] = drupal_get_feeds();
$variables['footer_message'] = filter_xss_admin(variable_get('site_footer', FALSE));
$variables['head'] = drupal_get_html_head();
- $variables['help'] = theme('help');
$variables['language'] = $GLOBALS['language'];
$variables['language']->dir = $GLOBALS['language']->direction ? 'rtl' : 'ltr';
$variables['logo'] = theme_get_setting('logo');
Index: modules/contact/contact.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/contact/contact.admin.inc,v
retrieving revision 1.9
diff -u -p -r1.9 contact.admin.inc
--- modules/contact/contact.admin.inc 25 Mar 2009 13:45:00 -0000 1.9
+++ modules/contact/contact.admin.inc 9 Apr 2009 12:12:41 -0000
@@ -164,11 +164,6 @@ function contact_admin_delete_submit($fo
}
function contact_admin_settings() {
- $form['contact_form_information'] = array('#type' => 'textarea',
- '#title' => t('Additional information'),
- '#default_value' => t('You can leave a message using the contact form below.'),
- '#description' => t('Information to show on the contact page. Can be anything from submission guidelines to your postal address or telephone number.', array('@form' => url('contact'))),
- );
$form['contact_hourly_threshold'] = array('#type' => 'select',
'#title' => t('Hourly threshold'),
'#options' => drupal_map_assoc(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50)),
Index: modules/contact/contact.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/contact/contact.pages.inc,v
retrieving revision 1.16
diff -u -p -r1.16 contact.pages.inc
--- modules/contact/contact.pages.inc 8 Mar 2009 05:08:22 -0000 1.16
+++ modules/contact/contact.pages.inc 9 Apr 2009 12:12:41 -0000
@@ -43,7 +43,6 @@ function contact_mail_page() {
if (count($categories) > 0) {
$form['#token'] = $user->uid ? $user->name . $user->mail : '';
- $form['contact_information'] = array('#markup' => filter_xss_admin(variable_get('contact_form_information', t('You can leave a message using the contact form below.'))));
$form['name'] = array('#type' => 'textfield',
'#title' => t('Your name'),
'#maxlength' => 255,
Index: modules/system/system.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.install,v
retrieving revision 1.314
diff -u -p -r1.314 system.install
--- modules/system/system.install 3 Apr 2009 17:50:21 -0000 1.314
+++ modules/system/system.install 9 Apr 2009 12:12:41 -0000
@@ -3263,6 +3263,32 @@ function system_update_7020() {
}
/**
+ * Add help block to the help region, migrate custom variables to blocks.
+ */
+function system_update_7021() {
+ $ret = array();
+
+ // Migrate contact form information and user register help to blocks.
+ $bid_max = db_query("SELECT MAX(bid) FROM box");
+ if ($contact_help = variable_get('contact_form_information', '')) {
+ db_query("INSERT INTO {box} (body, info, format) VALUES ('%s', '%s', %d)", $contact_help, 'Contact page help', FILTER_FORMAT_DEFAULT);
+ }
+ if ($user_help = variable_get('user_registration_help', '')) {
+ db_query("INSERT INTO {box} (body, info, format) VALUES ('%s', '%s', %d)", $user_help, 'User registration help', FILTER_FORMAT_DEFAULT);
+ }
+
+ foreach (list_themes() as $theme) {
+ // 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)");
+ // Add contact help block.
+ $ret[] = update_sql("INSERT INTO {block} (module, delta, theme, status, weight, region, visibility, pages, cache) VALUES ('block', '". ($bid_max + 1) ."', '". $theme->name ."', 1, 5, 'help', 1, 'contact', -1)");
+ // Add user registration help block.
+ $ret[] = update_sql("INSERT INTO {block} (module, delta, theme, status, weight, region, visibility, pages, cache) VALUES ('block', '". ($bid_max + 2) ."', '". $theme->name ."', 1, 10, 'help', 1, 'user/register', -1)");
+ }
+ return $ret;
+}
+
+/**
* @} End of "defgroup updates-6.x-to-7.x"
* The next series of updates should start at 8000.
*/
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.676
diff -u -p -r1.676 system.module
--- modules/system/system.module 25 Mar 2009 18:40:50 -0000 1.676
+++ modules/system/system.module 9 Apr 2009 12:12:41 -0000
@@ -887,6 +887,10 @@ function system_block_list() {
// Not worth caching.
'cache' => BLOCK_NO_CACHE,
);
+ $blocks['help'] = array(
+ 'info' => t('System generated help for page'),
+ 'weight' => '5',
+ );
// System-defined menu blocks.
foreach (menu_list_system_menus() as $menu_name => $title) {
$blocks[$menu_name]['info'] = t($title);
@@ -952,6 +956,12 @@ function system_block_view($delta = '')
$block['subject'] = NULL;
$block['content'] = theme('system_powered_by', $image_path);
return $block;
+ case 'help':
+ return array(
+ 'subject' => NULL, // Don't display a title
+ 'content' => menu_get_active_help(),
+ );
+ break;
default:
// All system menu blocks.
$system_menus = menu_list_system_menus();
@@ -1113,6 +1123,7 @@ function system_theme_default() {
'content' => 'Content',
'header' => 'Header',
'footer' => 'Footer',
+ 'help' => 'Help',
),
'description' => '',
'features' => array(
Index: modules/user/user.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.admin.inc,v
retrieving revision 1.40
diff -u -p -r1.40 user.admin.inc
--- modules/user/user.admin.inc 26 Feb 2009 07:30:28 -0000 1.40
+++ modules/user/user.admin.inc 9 Apr 2009 12:12:41 -0000
@@ -238,7 +238,6 @@ function user_admin_settings() {
$form['registration'] = array('#type' => 'fieldset', '#title' => t('User registration settings'));
$form['registration']['user_register'] = array('#type' => 'radios', '#title' => t('Public registrations'), '#default_value' => variable_get('user_register', 1), '#options' => array(t('Only site administrators can create new user accounts.'), t('Visitors can create accounts and no administrator approval is required.'), t('Visitors can create accounts but administrator approval is required.')));
$form['registration']['user_email_verification'] = array('#type' => 'checkbox', '#title' => t('Require e-mail verification when a visitor creates an account'), '#default_value' => variable_get('user_email_verification', TRUE), '#description' => t('If this box is checked, new users will be required to validate their e-mail address prior to logging into the site, and will be assigned a system-generated password. With it unchecked, users will be logged in immediately upon registering, and may select their own passwords during registration.'));
- $form['registration']['user_registration_help'] = array('#type' => 'textarea', '#title' => t('User registration guidelines'), '#default_value' => variable_get('user_registration_help', ''), '#description' => t('This text is displayed at the top of the user registration form and is useful for helping or instructing your users.'));
// Account cancellation settings.
module_load_include('inc', 'user', 'user.pages');
Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.973
diff -u -p -r1.973 user.module
--- modules/user/user.module 1 Apr 2009 20:00:47 -0000 1.973
+++ modules/user/user.module 9 Apr 2009 12:12:41 -0000
@@ -2826,11 +2826,6 @@ function user_register() {
$form = array();
- // Display the registration form.
- if (!$admin) {
- $form['user_registration_help'] = array('#markup' => filter_xss_admin(variable_get('user_registration_help', '')));
- }
-
// Merge in the default user edit fields.
$form = array_merge($form, user_edit_form($form_state, NULL, NULL, TRUE));
if ($admin) {
Index: profiles/default/default.profile
===================================================================
RCS file: /cvs/drupal/drupal/profiles/default/default.profile,v
retrieving revision 1.39
diff -u -p -r1.39 default.profile
--- profiles/default/default.profile 20 Mar 2009 19:18:11 -0000 1.39
+++ profiles/default/default.profile 9 Apr 2009 12:12:41 -0000
@@ -91,11 +91,12 @@ function default_profile_task_list() {
*/
function default_profile_tasks(&$task, $url) {
- // Enable 4 standard blocks.
+ // Enable 5 standard blocks.
db_query("INSERT INTO {block} (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 {block} (module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)", 'system', 'navigation', 'garland', 1, 0, 'left', '', -1);
db_query("INSERT INTO {block} (module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)", 'system', 'management', 'garland', 1, 1, 'left', '', -1);
db_query("INSERT INTO {block} (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 {block} (module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)", 'system', 'help', 'garland', 1, 0, 'help', '', -1);
// Insert default user-defined node types into the database. For a complete
// list of available node type attributes, refer to the node type API
Index: profiles/expert/expert.profile
===================================================================
RCS file: /cvs/drupal/drupal/profiles/expert/expert.profile,v
retrieving revision 1.5
diff -u -p -r1.5 expert.profile
--- profiles/expert/expert.profile 20 Mar 2009 19:18:11 -0000 1.5
+++ profiles/expert/expert.profile 9 Apr 2009 12:12:41 -0000
@@ -42,10 +42,11 @@ function expert_profile_task_list() {
* Perform any final installation tasks for this profile.
*/
function expert_profile_tasks(&$task, $url) {
- // Enable 3 standard blocks.
+ // Enable 4 standard blocks.
db_query("INSERT INTO {block} (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 {block} (module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)", 'system', 'navigation', 'garland', 1, 0, 'left', '', -1);
db_query("INSERT INTO {block} (module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)", 'system', 'management', 'garland', 1, 1, 'left', '', -1);
+ db_query("INSERT INTO {block} (module, delta, theme, status, weight, region, pages, cache) VALUES ('%s', '%s', '%s', %d, %d, '%s', '%s', %d)", 'system', 'help', 'garland', 1, 0, 'help', '', -1);
}
/**