? _34920_weights.patch
? sites/feast-or-fa.mine.nu.drupal
Index: modules/book.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/book.module,v
retrieving revision 1.337
diff -u -r1.337 book.module
--- modules/book.module	5 Dec 2005 16:07:18 -0000	1.337
+++ modules/book.module	14 Dec 2005 00:57:45 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: book.module,v 1.337 2005-12-05 16:07:18 dries Exp $
+// $Id: book.module,v 1.337 2005/12/05 16:07:18 dries Exp $
 
 /**
  * @file
@@ -247,7 +247,7 @@
  */
 function book_form(&$node) {
   $form['parent'] = array(
-    '#type' => 'select', '#title' => t('Parent'), '#default_value' => ($node->parent ? $node->parent : arg(4)), '#options' => book_toc($node->nid), '#weight' => -15,
+    '#type' => 'select', '#title' => t('Parent'), '#default_value' => ($node->parent ? $node->parent : arg(4)), '#options' => book_toc($node->nid), '#weight' => -4,
     '#description' => t('The parent that this page belongs in. Note that pages whose parent is &lt;top-level&gt; are regarded as independent, top-level books.')
   );
 
@@ -258,16 +258,13 @@
   $form['format'] = filter_form($node->format);
 
   $form['log'] = array(
-    '#type' => 'fieldset', '#title' => t('Log message'), '#collapsible' => TRUE, '#collapsed' => TRUE
-  );
-  $form['log']['message'] = array(
-    '#type' => 'textarea', '#default_value' => $node->log, '#weight' => 18,
+    '#type' => 'textarea', '#title' => t('Log message'), '#default_value' => $node->log, '#weight' => 5,
     '#description' => t('An explanation of the additions or updates being made to help other authors understand your motivations.')
   );
 
   if (user_access('administer nodes')) {
     $form['weight'] = array(
-        '#type' => 'weight', '#title' => t('Weight'),  '#default_value' => $node->weight, '#delta' => 15, '#weight' => -14,
+        '#type' => 'weight', '#title' => t('Weight'), '#default_value' => $node->weight, '#delta' => 15, '#weight' => 5,
         '#description' => t('Pages at a given level are ordered first by weight and then by title.')
     );
   }
Index: modules/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment.module,v
retrieving revision 1.403
diff -u -r1.403 comment.module
--- modules/comment.module	8 Dec 2005 09:11:32 -0000	1.403
+++ modules/comment.module	14 Dec 2005 00:57:47 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: comment.module,v 1.403 2005-12-08 09:11:32 dries Exp $
+// $Id: comment.module,v 1.403 2005/12/08 09:11:32 dries Exp $
 
 /**
  * @file
@@ -241,9 +241,10 @@
       $selected = isset($node->comment) ? $node->comment : variable_get("comment_$node->type", COMMENT_NODE_READ_WRITE);
       $form['user_comments'] = array(
         '#type' => 'fieldset',
-        '#title' => t('User Comments'),
+        '#title' => t('User comments'),
         '#collapsible' => TRUE,
         '#collapsed' => TRUE,
+        '#weight' => 30,
       );
       $form['user_comments']['comment'] = array(
         '#type' => 'radios',
Index: modules/filter.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/filter.module,v
retrieving revision 1.93
diff -u -r1.93 filter.module
--- modules/filter.module	10 Dec 2005 19:35:13 -0000	1.93
+++ modules/filter.module	14 Dec 2005 00:57:48 -0000
@@ -750,7 +750,7 @@
  * @return
  *   HTML for the form element.
  */
-function filter_form($value = FILTER_FORMAT_DEFAULT, $weight = -16) {
+function filter_form($value = FILTER_FORMAT_DEFAULT, $weight = 0) {
   if ($value == FILTER_FORMAT_DEFAULT) {
     $value = variable_get('filter_default_format', 1);
   }
Index: modules/menu.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/menu.module,v
retrieving revision 1.54
diff -u -r1.54 menu.module
--- modules/menu.module	12 Dec 2005 14:25:45 -0000	1.54
+++ modules/menu.module	14 Dec 2005 00:57:49 -0000
@@ -658,8 +658,9 @@
       '#type' => 'fieldset',
       '#title' => t('Menu settings'),
       '#collapsible' => TRUE,
-      '#collapsed' => TRUE,
+      '#collapsed' => empty($item['title']),
       '#tree' => TRUE,
+      '#weight' => 30,
     );
 
     $form['menu']['title'] = array(
Index: modules/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node.module,v
retrieving revision 1.562
diff -u -r1.562 node.module
--- modules/node.module	10 Dec 2005 08:12:59 -0000	1.562
+++ modules/node.module	14 Dec 2005 00:57:51 -0000
@@ -1614,10 +1614,10 @@
   // Get the node-specific bits.
   $form = array_merge($form, node_invoke($node, 'form'));
   if (!isset($form['title']['#weight'])) {
-    $form['title']['#weight'] = -18;
+    $form['title']['#weight'] = -5;
   }
   if (!isset($form['body']['#weight'])) {
-    $form['body']['#weight'] = -17;
+    $form['body']['#weight'] = 0;
   }
 
   // If this is a new node, fill in the default values.
@@ -1640,13 +1640,13 @@
 
   if (user_access('administer nodes')) {
     // Node author information
-    $form['author'] = array('#type' => 'fieldset', '#title' => t('Authoring information'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#weight' => -5);
+    $form['author'] = array('#type' => 'fieldset', '#title' => t('Authoring information'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#weight' => 20);
     $form['author']['name'] = array('#type' => 'textfield', '#title' => t('Authored by'), '#maxlength' => 60, '#autocomplete_path' => 'user/autocomplete', '#required' => TRUE, '#default_value' => $node->name, '#weight' => -1);
     $form['author']['date'] = array('#type' => 'textfield', '#title' => t('Authored on'), '#maxlength' => 25, '#required' => TRUE, '#default_value' => $node->date);
 
 
     // Node options for administrators
-    $form['options'] = array('#type' => 'fieldset', '#title' => t('Publishing options'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#weight' => -5);
+    $form['options'] = array('#type' => 'fieldset', '#title' => t('Publishing options'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#weight' => 25);
     $form['options']['status']   = array('#type' => 'checkbox', '#title' => t('Published'), '#default_value' => $node->status);
     $form['options']['moderate'] = array('#type' => 'checkbox', '#title' => t('In moderation queue'), '#default_value' => $node->moderate);
     $form['options']['promote']  = array('#type' => 'checkbox', '#title' => t('Promoted to front page'), '#default_value' => $node->promote);
@@ -1663,11 +1663,10 @@
   }
 
   // Add the buttons.
-  $form['preview'] = array('#type' => 'button', '#value' => t('Preview'), '#weight' => 19);
-
-  $form['submit'] = array('#type' => 'submit', '#value' => t('Submit'), '#weight' => 20);
+  $form['preview'] = array('#type' => 'button', '#value' => t('Preview'), '#weight' => 40);
+  $form['submit'] = array('#type' => 'submit', '#value' => t('Submit'), '#weight' => 45);
   if ($node->nid && node_access('delete', $node)) {
-    $form['delete'] = array('#type' => 'button', '#value' => t('Delete'), '#weight' => 21);
+    $form['delete'] = array('#type' => 'button', '#value' => t('Delete'), '#weight' => 50);
   }
 
   if ($op == t('Preview')) {
Index: modules/page.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/page.module,v
retrieving revision 1.147
diff -u -r1.147 page.module
--- modules/page.module	5 Dec 2005 09:11:33 -0000	1.147
+++ modules/page.module	14 Dec 2005 00:57:51 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: page.module,v 1.147 2005-12-05 09:11:33 dries Exp $
+// $Id: page.module,v 1.147 2005/12/05 09:11:33 dries Exp $
 
 /**
  * @file
@@ -99,10 +99,7 @@
   $form['format'] = filter_form($node->format);
 
   $form['log'] = array(
-    '#type' => 'fieldset', '#title' => t('Log message'), '#collapsible' => TRUE, '#collapsed' => TRUE
-  );
-  $form['log']['message'] = array(
-    '#type' => 'textarea', '#default_value' => $node->log,
+    '#type' => 'textarea', '#title' => t('Log message'), '#default_value' => $node->log, '#weight' => 5,
     '#description' => t('An explanation of the additions or updates being made to help other authors understand your motivations.')
   );
 
Index: modules/path.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/path.module,v
retrieving revision 1.74
diff -u -r1.74 path.module
--- modules/path.module	12 Dec 2005 14:25:45 -0000	1.74
+++ modules/path.module	14 Dec 2005 00:57:52 -0000
@@ -225,7 +225,8 @@
       '#type' => 'fieldset',
       '#title' => t('URL path settings'),
       '#collapsible' => TRUE,
-      '#collapsed' => TRUE,
+      '#collapsed' => empty($path),
+      '#weight' => 30,
     );
     $form['path']['path'] = array(
       '#type' => 'textfield',
Index: modules/story.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/story.module,v
retrieving revision 1.179
diff -u -r1.179 story.module
--- modules/story.module	5 Dec 2005 09:11:33 -0000	1.179
+++ modules/story.module	14 Dec 2005 00:57:52 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: story.module,v 1.179 2005-12-05 09:11:33 dries Exp $
+// $Id: story.module,v 1.179 2005/12/05 09:11:33 dries Exp $
 
 /**
  * @file
@@ -91,10 +91,6 @@
   $form['body'] = array('#type' => 'textarea', '#title' => t('Body'), '#default_value' => $node->body, '#rows' => 20, '#required' => TRUE);
   $form['format'] = filter_form($node->format);
 
-  $form['log'] = array('#type' => 'fieldset', '#title' => t('Log message'), '#collapsible' => TRUE, '#collapsed' => TRUE);
-  $form['log']['message'] = array('#type' => 'textarea', '#default_value' => $node->log, '#description' => t('An explanation of the additions or updates being made to help other authors understand your motivations.')
-  );
-
   return $form;
 }
 
Index: modules/taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy.module,v
retrieving revision 1.243
diff -u -r1.243 taxonomy.module
--- modules/taxonomy.module	6 Dec 2005 12:20:24 -0000	1.243
+++ modules/taxonomy.module	14 Dec 2005 00:57:53 -0000
@@ -1,5 +1,5 @@
 <?php
-// $Id: taxonomy.module,v 1.243 2005-12-06 12:20:24 dries Exp $
+// $Id: taxonomy.module,v 1.243 2005/12/06 12:20:24 dries Exp $
 
 /**
  * @file
@@ -131,7 +131,7 @@
   $extra = module_invoke_all('taxonomy', 'form', 'vocabulary');
   if (is_array($extra)) {
     foreach ($extra as $key => $element) {
-      $extra[$key]['#weight'] = isset($extra[$key]['#weight']) ? $nodeapi[$key]['#weight'] : -18;
+      $extra[$key]['#weight'] = isset($extra[$key]['#weight']) ? $extra[$key]['#weight'] : -18;
     }
     $form = array_merge($form, $extra);
   }
@@ -242,7 +242,7 @@
   $extra = module_invoke_all('taxonomy', 'term', 'vocabulary');
   if (is_array($extra)) {
     foreach ($extra as $key => $element) {
-      $extra[$key]['#weight'] = isset($extra[$key]['#weight']) ? $nodeapi[$key]['#weight'] : -18;
+      $extra[$key]['#weight'] = isset($extra[$key]['#weight']) ? $extra[$key]['#weight'] : -18;
     }
     $form = array_merge($form, $extra);
   }
@@ -532,13 +532,12 @@
       }
       else {
         $ntterms = isset($node->taxonomy) ? $terms : array_keys($terms);
-
         $form['taxonomy'][$vocabulary->vid] = taxonomy_form($vocabulary->vid, $ntterms, $help, 'taxonomy');
       }
     }
     if (isset($form['taxonomy'])) {
       $form['taxonomy']['#tree'] = TRUE;
-      $form['taxonomy']['#weight'] = -15;
+      $form['taxonomy']['#weight'] = $vocabulary->weight;
     }
   }
 }
Index: modules/upload.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/upload.module,v
retrieving revision 1.66
diff -u -r1.66 upload.module
--- modules/upload.module	10 Dec 2005 19:43:12 -0000	1.66
+++ modules/upload.module	14 Dec 2005 00:57:54 -0000
@@ -172,6 +172,7 @@
         '#description' => t('Changes made to the attachments are not permanent until you save this post. The first "listed" file will be included in RSS feeds.'),
         '#prefix' => '<div class="attachments">',
         '#suffix' => '</div>',
+        '#weight' => 30,
       );
       $form['attachments'] += _upload_form($node);
       $form['#attributes'] = array('enctype' => 'multipart/form-data');
