Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.416
diff -u -p -r1.416 theme.inc
--- includes/theme.inc 6 Feb 2008 19:38:26 -0000 1.416
+++ includes/theme.inc 16 Feb 2008 17:02:38 -0000
@@ -863,11 +863,6 @@ function theme_get_settings($key = NULL)
'toggle_secondary_links' => 1,
);
- if (module_exists('node')) {
- foreach (node_get_types() as $type => $name) {
- $defaults['toggle_node_info_'. $type] = 1;
- }
- }
$settings = array_merge($defaults, variable_get('theme_settings', array()));
if ($key) {
@@ -1876,7 +1871,7 @@ function template_preprocess_node(&$vari
$variables = array_merge((array)$node, $variables);
// Display info only on certain node types.
- if (theme_get_setting('toggle_node_info_'. $node->type)) {
+ if (variable_get('node_submitted_'. $node->type, TRUE)) {
$variables['submitted'] = theme('node_submitted', $node);
$variables['picture'] = theme_get_setting('toggle_node_user_picture') ? theme('user_picture', $node) : '';
}
Index: modules/node/content_types.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/content_types.inc,v
retrieving revision 1.50
diff -u -p -r1.50 content_types.inc
--- modules/node/content_types.inc 27 Jan 2008 18:03:05 -0000 1.50
+++ modules/node/content_types.inc 16 Feb 2008 17:02:38 -0000
@@ -161,7 +161,18 @@ function node_type_form(&$form_state, $t
),
'#description' => t('Users with the administer nodes permission will be able to override these options.'),
);
-
+ $form['display'] = array(
+ '#type' => 'fieldset',
+ '#title' => t('Display settings'),
+ '#collapsible' => TRUE,
+ '#collapsed' => TRUE,
+ );
+ $form['display']['node_submitted'] = array(
+ '#type' => 'checkbox',
+ '#title' => t('Display post information'),
+ '#default_value' => variable_get('node_submitted_'. $type->type, TRUE),
+ '#description' => t('Enable or disable the submitted by Username on date text.'),
+ );
$form['old_type'] = array(
'#type' => 'value',
'#value' => $type->type,
Index: modules/system/system.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v
retrieving revision 1.63
diff -u -p -r1.63 system.admin.inc
--- modules/system/system.admin.inc 4 Feb 2008 12:35:48 -0000 1.63
+++ modules/system/system.admin.inc 16 Feb 2008 17:02:39 -0000
@@ -418,21 +418,6 @@ function system_theme_settings(&$form_st
'#prefix' => '
',
'#suffix' => '
',
);
-
- // Toggle node display.
- $node_types = node_get_types('names');
- if ($node_types) {
- $form['node_info'] = array(
- '#type' => 'fieldset',
- '#title' => t('Display post information on'),
- '#description' => t('Enable or disable the submitted by Username on date text when displaying posts of the following type.'),
- '#prefix' => '',
- '#suffix' => '
',
- );
- foreach ($node_types as $type => $name) {
- $form['node_info']["toggle_node_info_$type"] = array('#type' => 'checkbox', '#title' => check_plain($name), '#default_value' => $settings["toggle_node_info_$type"]);
- }
- }
}
elseif (!element_children($form['theme_settings'])) {
// If there is no element in the theme settings fieldset then do not show
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.590
diff -u -p -r1.590 system.module
--- modules/system/system.module 14 Feb 2008 18:34:21 -0000 1.590
+++ modules/system/system.module 16 Feb 2008 17:02:39 -0000
@@ -1072,25 +1072,6 @@ function _system_sort_requirements($a, $
}
/**
- * Implementation of hook_node_type().
- *
- * Updates theme settings after a node type change.
- */
-function system_node_type($op, $info) {
- if ($op == 'update' && !empty($info->old_type) && $info->type != $info->old_type) {
- $old = 'toggle_node_info_'. $info->old_type;
- $new = 'toggle_node_info_'. $info->type;
-
- $theme_settings = variable_get('theme_settings', array());
- if (isset($theme_settings[$old])) {
- $theme_settings[$new] = $theme_settings[$old];
- unset($theme_settings[$old]);
- variable_set('theme_settings', $theme_settings);
- }
- }
-}
-
-/**
* Output a confirmation form
*
* This function returns a complete form for confirming an action. A link is
Index: profiles/default/default.profile
===================================================================
RCS file: /cvs/drupal/drupal/profiles/default/default.profile,v
retrieving revision 1.22
diff -u -p -r1.22 default.profile
--- profiles/default/default.profile 17 Dec 2007 12:43:34 -0000 1.22
+++ profiles/default/default.profile 16 Feb 2008 17:02:39 -0000
@@ -129,9 +129,7 @@ function default_profile_tasks(&$task, $
variable_set('comment_page', COMMENT_NODE_DISABLED);
// Don't display date and author information for page nodes by default.
- $theme_settings = variable_get('theme_settings', array());
- $theme_settings['toggle_node_info_page'] = FALSE;
- variable_set('theme_settings', $theme_settings);
+ variable_set('node_submitted_page', FALSE);
// Update the menu router information.
menu_rebuild();
Index: themes/chameleon/chameleon.theme
===================================================================
RCS file: /cvs/drupal/drupal/themes/chameleon/chameleon.theme,v
retrieving revision 1.76
diff -u -p -r1.76 chameleon.theme
--- themes/chameleon/chameleon.theme 24 Jan 2008 09:42:53 -0000 1.76
+++ themes/chameleon/chameleon.theme 16 Feb 2008 17:02:39 -0000
@@ -131,7 +131,7 @@ function chameleon_node($node, $teaser =
$output .= " \n";
- $submitted['node_submitted'] = theme_get_setting("toggle_node_info_$node->type") ? array(
+ $submitted['node_submitted'] = variable_get('node_submitted_'. $node->type, TRUE) ? array(
'title' => t("By !author at @date", array('!author' => theme('username', $node), '@date' => format_date($node->created, 'small'))),
'html' => TRUE) : array();