Index: modules/node/node.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.admin.inc,v
retrieving revision 1.14
diff -u -p -r1.14 node.admin.inc
--- modules/node/node.admin.inc	8 Dec 2007 14:06:21 -0000	1.14
+++ modules/node/node.admin.inc	19 Dec 2007 16:01:54 -0000
@@ -16,9 +16,15 @@ function node_configure() {
     $status = '<p>'. t('If the site is experiencing problems with permissions to content, you may have to rebuild the permissions cache. Possible causes for permission problems are disabling modules or configuration changes to permissions. Rebuilding will remove all privileges to posts, and replace them with permissions based on the current modules and settings.') .'</p>';
     $status .= '<p>'. t('Rebuilding may take some time if there is a lot of content or complex permission settings. After rebuilding has completed posts will automatically use the new permissions.') .'</p>';
 
-    $form['access'] = array('#type' => 'fieldset', '#title' => t('Node access status'));
+    $form['access'] = array(
+      '#type' => 'fieldset',
+      '#title' => t('Node access status'),
+    );
     $form['access']['status'] = array('#value' => $status);
-    $form['access']['rebuild'] = array('#type' => 'submit', '#value' => t('Rebuild permissions'));
+    $form['access']['rebuild'] = array(
+      '#type' => 'submit',
+      '#value' => t('Rebuild permissions'),
+    );
   }
 
   $form['default_nodes_main'] = array(
@@ -28,15 +34,28 @@ function node_configure() {
   );
   $form['teaser_length'] = array(
     '#type' => 'select', '#title' => t('Length of trimmed posts'), '#default_value' => variable_get('teaser_length', 600),
-    '#options' => array(0 => t('Unlimited'), 200 => t('200 characters'), 400 => t('400 characters'), 600 => t('600 characters'),
-      800 => t('800 characters'), 1000 => t('1000 characters'), 1200 => t('1200 characters'), 1400 => t('1400 characters'),
-      1600 => t('1600 characters'), 1800 => t('1800 characters'), 2000 => t('2000 characters')),
+    '#options' => array(
+      0 => t('Unlimited'),
+      200 => t('200 characters'),
+      400 => t('400 characters'),
+      600 => t('600 characters'),
+      800 => t('800 characters'),
+      1000 => t('1000 characters'),
+      1200 => t('1200 characters'),
+      1400 => t('1400 characters'),
+      1600 => t('1600 characters'),
+      1800 => t('1800 characters'),
+      2000 => t('2000 characters'),
+    ),
     '#description' => t("The maximum number of characters used in the trimmed version of a post. Drupal will use this setting to determine at which offset long posts should be trimmed. The trimmed version of a post is typically used as a teaser when displaying the post on the main page, in XML feeds, etc. To disable teasers, set to 'Unlimited'. Note that this setting will only affect new or updated content and will not affect existing teasers.")
   );
 
   $form['node_preview'] = array(
-    '#type' => 'radios', '#title' => t('Preview post'), '#default_value' => variable_get('node_preview', 0),
-    '#options' => array(t('Optional'), t('Required')), '#description' => t('Must users preview posts before submitting?')
+    '#type' => 'radios',
+    '#title' => t('Preview post'),
+    '#default_value' => variable_get('node_preview', 0),
+    '#options' => array(t('Optional'), t('Required')),
+    '#description' => t('Must users preview posts before submitting?'),
   );
 
   $form['#validate'] = array('node_configure_validate');
@@ -57,8 +76,7 @@ function node_configure_validate($form, 
  * Menu callback: confirm rebuilding of permissions.
  */
 function node_configure_rebuild_confirm() {
-  return confirm_form(array(), t('Are you sure you want to rebuild the permissions on site content?'),
-                  'admin/content/node-settings', t('This action rebuilds all permissions on site content, and may be a lengthy process. This action cannot be undone.'), t('Rebuild permissions'), t('Cancel'));
+  return confirm_form(array(), t('Are you sure you want to rebuild the permissions on site content?'), 'admin/content/node-settings', t('This action rebuilds all permissions on site content, and may be a lengthy process. This action cannot be undone.'), t('Rebuild permissions'), t('Cancel'));
 }
 
 /**
@@ -118,14 +136,23 @@ function node_node_operations() {
  */
 function node_filters() {
   // Regular filters
-  $filters['status'] = array('title' => t('status'),
-    'options' => array('status-1'   => t('published'), 'status-0' => t('not published'),
-                       'promote-1'  => t('promoted'),  'promote-0' => t('not promoted'),
-                       'sticky-1'   => t('sticky'),    'sticky-0' => t('not sticky'))
+  $filters['status'] = array(
+    'title' => t('status'),
+    'options' => array(
+      'status-1' => t('published'),
+      'status-0' => t('not published'),
+      'promote-1' => t('promoted'),
+      'promote-0' => t('not promoted'),
+      'sticky-1' => t('sticky'),
+      'sticky-0' => t('not sticky'),
+    ),
   );
   // Include translation states if we have this module enabled
   if (module_exists('translation')) {
-    $filters['status']['options'] += array('translate-0' => t('up to date translation'), 'translate-1' => t('outdated translation'));
+    $filters['status']['options'] += array(
+      'translate-0' => t('Up to date translation'),
+      'translate-1' => t('Outdated translation'),
+    );
   }
 
   $filters['type'] = array('title' => t('type'), 'options' => node_get_types('names'));
@@ -187,7 +214,8 @@ function node_filter_form() {
   $filters = node_filters();
 
   $i = 0;
-  $form['filters'] = array('#type' => 'fieldset',
+  $form['filters'] = array(
+    '#type' => 'fieldset',
     '#title' => t('Show only items where'),
     '#theme' => 'node_filters',
   );
@@ -358,6 +386,9 @@ function node_admin_content($form_state)
   return $form;
 }
 
+/**
+ * @todo PHPDOC
+ */
 function node_admin_nodes() {
 
   $filter = node_build_filter_query();
@@ -368,7 +399,8 @@ function node_admin_nodes() {
   $count = db_result(db_query("SELECT COUNT(*) FROM {node} n WHERE language != ''"));
   $multilanguage = (module_exists('locale') || $count);
 
-  $form['options'] = array('#type' => 'fieldset',
+  $form['options'] = array(
+    '#type' => 'fieldset',
     '#title' => t('Update options'),
     '#prefix' => '<div class="container-inline">',
     '#suffix' => '</div>',
@@ -377,7 +409,11 @@ function node_admin_nodes() {
   foreach (module_invoke_all('node_operations') as $operation => $array) {
     $options[$operation] = $array['label'];
   }
-  $form['options']['operation'] = array('#type' => 'select', '#options' => $options,  '#default_value' => 'approve');
+  $form['options']['operation'] = array(
+    '#type' => 'select',
+    '#options' => $options,
+    '#default_value' => 'approve',
+  );
   $form['options']['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Update'),
@@ -459,14 +495,16 @@ function node_multiple_delete_confirm(&$
   // array_filter returns only elements with TRUE values
   foreach ($nodes as $nid => $value) {
     $title = db_result(db_query('SELECT title FROM {node} WHERE nid = %d', $nid));
-    $form['nodes'][$nid] = array('#type' => 'hidden', '#value' => $nid, '#prefix' => '<li>', '#suffix' => check_plain($title) ."</li>\n");
+    $form['nodes'][$nid] = array(
+      '#type' => 'hidden',
+      '#value' => $nid,
+      '#prefix' => '<li>',
+      '#suffix' => check_plain($title) ."</li>\n",
+    );
   }
   $form['operation'] = array('#type' => 'hidden', '#value' => 'delete');
   $form['#submit'][] = 'node_multiple_delete_confirm_submit';
-  return confirm_form($form,
-                      t('Are you sure you want to delete these items?'),
-                      'admin/content/node', t('This action cannot be undone.'),
-                      t('Delete all'), t('Cancel'));
+  return confirm_form($form, t('Are you sure you want to delete these items?'), 'admin/content/node', t('This action cannot be undone.'), t('Delete all'), t('Cancel'));
 }
 
 function node_multiple_delete_confirm_submit($form, &$form_state) {
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.928
diff -u -p -r1.928 node.module
--- modules/node/node.module	19 Dec 2007 15:55:02 -0000	1.928
+++ modules/node/node.module	19 Dec 2007 16:02:03 -0000
@@ -855,8 +855,8 @@ function node_save(&$node) {
   $node->format = isset($node->format) ? $node->format : FILTER_FORMAT_DEFAULT;
   $update_node = TRUE;
 
-  //Generate the node table query and the
-  //the node_revisions table query
+  // Generate the node table query and the
+  // the node_revisions table query
   if ($node->is_new) {
     drupal_write_record('node', $node);
     _node_save_revision($node, $user->uid);
@@ -877,7 +877,7 @@ function node_save(&$node) {
     db_query('UPDATE {node} SET vid = %d WHERE nid = %d', $node->vid, $node->nid);
   }
 
- // Call the node specific callback (if any):
+  // Call the node specific callback (if any)
   node_invoke($node, $op);
   node_invoke_nodeapi($node, $op);
 
@@ -938,7 +938,7 @@ function node_delete($nid) {
  * Generate a display of the given node.
  *
  * @param $node
- *   A node array or node object.
+ *   A node object.
  * @param $teaser
  *   Whether to display the teaser only or the full form.
  * @param $page
@@ -950,8 +950,6 @@ function node_delete($nid) {
  *   An HTML representation of the themed node.
  */
 function node_view($node, $teaser = FALSE, $page = FALSE, $links = TRUE) {
-  $node = (object)$node;
-
   $node = node_build_content($node, $teaser, $page);
 
   if ($links) {
@@ -1226,15 +1224,17 @@ function node_search($op = 'search', $ke
         $node->body .= module_invoke('taxonomy', 'nodeapi', $node, 'update index');
 
         $extra = node_invoke_nodeapi($node, 'search result');
-        $results[] = array('link' => url('node/'. $item->sid, array('absolute' => TRUE)),
-                           'type' => check_plain(node_get_types('name', $node)),
-                           'title' => $node->title,
-                           'user' => theme('username', $node),
-                           'date' => $node->changed,
-                           'node' => $node,
-                           'extra' => $extra,
-                           'score' => $item->score / $total,
-                           'snippet' => search_excerpt($keys, $node->body));
+        $results[] = array(
+          'link' => url('node/'. $item->sid, array('absolute' => TRUE)),
+          'type' => check_plain(node_get_types('name', $node)),
+          'title' => $node->title,
+          'user' => theme('username', $node),
+          'date' => $node->changed,
+          'node' => $node,
+          'extra' => $extra,
+          'score' => $item->score / $total,
+          'snippet' => search_excerpt($keys, $node->body),
+        );
       }
       return $results;
   }
Index: modules/node/node.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.pages.inc,v
retrieving revision 1.18
diff -u -p -r1.18 node.pages.inc
--- modules/node/node.pages.inc	18 Dec 2007 10:31:42 -0000	1.18
+++ modules/node/node.pages.inc	19 Dec 2007 16:01:54 -0000
@@ -363,7 +363,7 @@ function theme_node_form($form) {
  */
 function node_preview($node) {
   if (node_access('create', $node) || node_access('update', $node)) {
-    // Load the user's name when needed:
+    // Load the user's name when needed
     if (isset($node->name)) {
       // The use of isset() is mandatory in the context of user IDs, because
       // user ID 0 denotes the anonymous user.
@@ -372,7 +372,8 @@ function node_preview($node) {
         $node->picture = $user->picture;
       }
       else {
-        $node->uid = 0; // anonymous user
+        // Anonymous user
+        $node->uid = 0;
       }
     }
     else if ($node->uid) {
@@ -393,7 +394,7 @@ function node_preview($node) {
       }
     }
 
-    // Display a preview of the node:
+    // Display a preview of the node
     // Previewing alters $node so it needs to be cloned.
     if (!form_get_errors()) {
       $cloned_node = drupal_clone($node);
@@ -502,7 +503,6 @@ function node_delete_confirm_submit($for
   }
 
   $form_state['redirect'] = '<front>';
-  return;
 }
 
 /**
