Index: nodeprofile.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/nodeprofile/Attic/nodeprofile.module,v
retrieving revision 1.7.2.35
diff -u -r1.7.2.35 nodeprofile.module
--- nodeprofile.module	20 Apr 2008 20:57:14 -0000	1.7.2.35
+++ nodeprofile.module	13 Oct 2008 20:18:17 -0000
@@ -77,7 +77,7 @@
     '#type' => 'checkbox',
     '#title' => t("Show this node profile during user registration."),
     '#default_value' => nodeprofile_get_settings('register', $type),
-    '#description' => t('If selected this node profile\'s form will be shown on the user register page. ') . 
+    '#description' => t('If selected this node profile\'s form will be shown on the user register page. ') .
       t('Note that this will bypass the node creation permission settings, so this will work for your users regardless if they have access to edit or create their nodeprofile later!'),
   );
   if (module_exists('rolesignup')) {
@@ -163,8 +163,8 @@
 
   if (is_nodeprofile(arg(4))) {
     drupal_set_message(t('You may not delete this relation manually. To remove it unmark the '.
-                         'content type "%type" as nodeprofile.',
-                         array('%type' => node_get_types('name', arg(4)))), 'error');
+      'content type "%type" as nodeprofile.',
+      array('%type' => node_get_types('name', arg(4)))), 'error');
     drupal_goto('admin/content/nodefamily');
   }
   else {
@@ -351,7 +351,7 @@
         }
         $fields[$category] = array(
           '#type' => 'subform',
-          '#id' => $node->type. '_node_form',
+          '#id' => $node->type .'_node_form',
           '#arguments' => array($node),
           '#data_separation' => ($category == 'account'),
           '#subform_after_build' => array('nodeprofile_integration_adapt_node_form'),
@@ -363,7 +363,7 @@
     case 'update':
       if (nodeprofile_get_settings('user_edit', $category) && node_access('create', $category)) {
         subform_element_submit();
-        unset($edit[$category. '_node_form']);
+        unset($edit[$category .'_node_form']);
       }
       break;
 
@@ -506,7 +506,7 @@
   watchdog('content', t('@type: deleted %title.', array('@type' => node_get_types('name', $node->type), '%title' => $node->title)));
 }
 
-/*
+/**
  * Returns a form, that will be added to the registration form
  */
 function nodeprofile_get_register_form() {
@@ -532,7 +532,7 @@
       $node = (object)array('uid' => 0, 'name' => '', 'type' => $type);
       $form[$type]['form'] = array(
         '#type' => 'subform',
-        '#id' => $type. '_node_form',
+        '#id' => $type .'_node_form',
         //data separation should be set to FALSE, so that imagefield works (see #201804)
         '#data_separation' => FALSE,
         '#arguments' => array($node),
@@ -546,25 +546,25 @@
   }
 }
 
-/*
- * Implementation of hook_nodeapi
+/**
+ * Implementation of hook_nodeapi().
  */
 function nodeprofile_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
   global $new_account, $last_nid;
-  
+
   //Set the correct author for new nodes created during registration
   if ($op == 'submit' && is_nodeprofile($node->type) && isset($new_account)) {
     $node->uid = $new_account->uid;
     $node->name = $new_account->name;
   }
-  
+
   //index themed node
   if ($op == 'alter' && is_nodeprofile($node->type) && isset($last_nid)) {
     $node->body = theme('node', $node, FALSE, TRUE);
   }
 }
 
-/*
+/**
  * Returns the nodeprofiles' settings
  * @param $return One of the nodeprofile_available_settings(), e.g. user_edit, register or weight
  * @param $type If not all, return the setting for the specified type
@@ -584,7 +584,7 @@
   return array();
 }
 
-/*
+/**
  * Returns all settings with the applied defaults
  */
 function nodeprofile_get_all_settings() {
@@ -600,7 +600,7 @@
   return $settings;
 }
 
-/*
+/**
  * Defines default values for the settings
  */
 function nodeprofile_get_setting_defaults($setting, $type) {
@@ -620,7 +620,7 @@
 }
 
 
-/*
+/**
  * Saves the nodeprofile settings - needs the complete settings array
  */
 function nodeprofile_set_settings($settings) {
@@ -638,14 +638,14 @@
   variable_set('nodeprofile_settings', $settings);
 }
 
-/*
+/**
  * returns an array containing all available nodeprofile settings
  */
 function nodeprofile_available_settings() {
   return array('weight', 'user_edit', 'register', 'register_roles', 'user_display', 'edit_link', 'add_link');
 }
 
-/*
+/**
  * Deactivates some unwanted fields for integrated node forms
  * This is invoked through #after_build on the subform elment
  */
@@ -656,7 +656,7 @@
   return $form_element;
 }
 
-/*
+/**
  * Loads the node, like node_load but caches the results
  */
 function nodeprofile_load($type, $uid) {
@@ -668,19 +668,19 @@
   return $cache[$type][$uid];
 }
 
-/*
+/**
  * Theme function for the nodeprofile display as teaser
  */
 function theme_nodeprofile_display_teaser(&$element) {
   if ($node = nodeprofile_load($element['#content_type'], $element['#uid'])) {
     if (node_access('view', $node)) {
-      $element['#node'] = $node; 
+      $element['#node'] = $node;
       return theme('nodeprofile_display_box', $element, node_view($node, TRUE, TRUE, FALSE));
     }
   }
 }
 
-/*
+/**
  * Theme function for the nodeprofile display as full node
  */
 function theme_nodeprofile_display_full(&$element) {
@@ -692,7 +692,7 @@
   }
 }
 
-/*
+/**
  * Theme function for the nodeprofile display as link
  */
 function theme_nodeprofile_display_link(&$element) {
@@ -707,7 +707,7 @@
   }
 }
 
-/*
+/**
  * Displays the given content in a nodeprofile box, which may have some tabs, that allow
  * users to perform some actions on the node
  */
@@ -726,7 +726,7 @@
     }
     $output .= "</ul>\n";
   }
-  return $head .'<div class="nodeprofile-display">'. $output . $content. '</div>';
+  return $head .'<div class="nodeprofile-display">'. $output . $content .'</div>';
 }
 
 /**
@@ -736,14 +736,14 @@
   return l(t("Create your @profile_node.", array('@profile_node' => $type_name)), nodeprofile_get_add_path($type), array(), drupal_get_destination());
 }
 
-/*
+/**
  * Themes the view tab
  */
 function theme_nodeprofile_display_tab_view($node) {
   return l(t('View'), 'node/'. $node->nid);
 }
 
-/*
+/**
  * Themes the edit tab
  */
 function theme_nodeprofile_display_tab_edit($node) {
@@ -752,7 +752,7 @@
   }
 }
 
-/*
+/**
  * Gets the edit path for a nodeprofile
  */
 function nodeprofile_get_edit_path($node) {
@@ -762,7 +762,7 @@
   return 'node/'. $node->nid .'/edit';
 }
 
-/*
+/**
  * Gets the add path for a nodeprofile of the active user
  */
 function nodeprofile_get_add_path($type) {
@@ -773,7 +773,7 @@
   return 'node/add/'. $type;
 }
 
-/*
+/**
  * Returns an array suitable for use with drupal_render,
  * that shows all nodperofiles as configured by the admin
  */
@@ -784,7 +784,7 @@
       $fields[$type] = array(
         '#type' => 'nodeprofile_display_'. $style,
         '#tabs' => nodeprofile_get_settings('edit_link', $type) ? array('view', 'edit') : ($style == 'teaser' ? array('view') : array()),
-        '#title' => $type_name,      
+        '#title' => $type_name,
         '#uid' => $uid,
         '#content_type' => $type,
         '#weight' => nodeprofile_get_settings('weight', $type),
