Index: pathauto_node.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto_node.inc,v
retrieving revision 1.44
diff -u -r1.44 pathauto_node.inc
--- pathauto_node.inc	20 May 2008 18:09:08 -0000	1.44
+++ pathauto_node.inc	25 May 2008 08:52:25 -0000
@@ -3,7 +3,7 @@
 
 /**
  * @file
- * Node hooked into Pathauto. (TODO: Better description!)
+ * Hook implementations for node module integration.
  *
  * @ingroup pathauto
  */
@@ -53,7 +53,7 @@
  */
 function node_pathauto_bulkupdate() {
 
-  // From all node types, only attempt to update those with patterns
+  // From all node types, only attempt to update those with patterns.
   $pattern_types = array();
 
   // If there's a default pattern we assume all types might be updated.
@@ -90,7 +90,7 @@
       $node->dst = $node_ref->dst;
       if (module_exists('taxonomy')) {
         // Must populate the terms for the node here for the category
-        // placeholders to work
+        // placeholders to work.
         $node->taxonomy = array_keys(taxonomy_node_get_terms($node));
       }
       $placeholders = pathauto_get_placeholders('node', $node);
Index: pathauto.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.install,v
retrieving revision 1.12
diff -u -r1.12 pathauto.install
--- pathauto.install	20 May 2008 18:09:08 -0000	1.12
+++ pathauto.install	25 May 2008 08:52:25 -0000
@@ -3,7 +3,7 @@
 
 /**
  * @file
- * Provides install, update, and uninstall functions for Pathauto.
+ * Install, update, and uninstall functions for Pathauto.
  *
  * @ingroup pathauto
  */
@@ -12,7 +12,7 @@
  * Implementation of hook_install().
  */
 function pathauto_install() {
-  // Check to see if taxonomy module is enabled before we set those variables
+  // Check to see if taxonomy module is enabled before we set those variables.
   if (module_exists('taxonomy')) {
     variable_set('pathauto_modulelist', array('node', 'user', 'taxonomy'));
     variable_set('pathauto_taxonomy_supportsfeeds', '0/feed');
@@ -23,10 +23,10 @@
     variable_set('pathauto_taxonomy_1_pattern', '');
   }
   else {
-    // Node and user are required so we don't have to check
+    // Node and user are required so we don't have to check.
     variable_set('pathauto_modulelist', array('node', 'user'));
   }
-  // Set the rest of the pathauto default variables
+  // Set the rest of the pathauto default variables.
   variable_set('pathauto_ignore_words', 'a,an,as,at,before,but,by,for,from,is,in,into,like,of,off,on,onto,per,since,than,the,this,that,to,up,via,with');
   variable_set('pathauto_indexaliases', FALSE);
   variable_set('pathauto_indexaliases_bulkupdate', FALSE);
@@ -45,28 +45,28 @@
   variable_set('pathauto_user_pattern', 'users/[user-raw]');
   variable_set('pathauto_user_supportsfeeds', NULL);
   variable_set('pathauto_verbose', FALSE);
-  
-  // Make sure we "replace hyphen with separator" by default
-  variable_set('pathauto_punctuation_hyphen', 1); // 1 is replace
 
-  // Set the weight to 1
+  // Make sure we "replace hyphen with separator" by default.
+  variable_set('pathauto_punctuation_hyphen', 1); // 1 is replace.
+
+  // Set the weight to 1.
   db_query("UPDATE {system} SET weight = 1 WHERE name = 'pathauto'");
 
   // Clear the cache to get these to take effect.
   cache_clear_all();
 }
- 
+
 /**
  * Implementation of hook_uninstall().
  */
 function pathauto_uninstall() {
-  // Delete all the pathauto variables and then clear the variable cache
+  // Delete all the pathauto variables and then clear the variable cache.
   db_query("DELETE FROM {variable} WHERE name LIKE 'pathauto_%'");
   cache_clear_all('variables', 'cache');
 }
 
 /**
- * Set the weight a little heavier to allow taxonomy to do its work
+ * Set the weight a little heavier to allow taxonomy to do its work.
  */
 function pathauto_update_1() {
   $ret = array();
@@ -77,19 +77,19 @@
 /**
  * pathauto_update_4 was a backport of a feature which is in core of Drupal 6
  * hence it is removed from the 6.x branch even though the goal is to support
- * Pathauto 5.x-1.x -> 6.x-2.x upgrades
+ * Pathauto 5.x-1.x -> 6.x-2.x upgrades.
  */
 
 /**
- * Delete the pathauto_node_supportsfeeds
+ * Delete the pathauto_node_supportsfeeds.
  */
 function pathauto_update_3() {
-  // Do nothing, this update was a mistake
+  // Do nothing, this update was a mistake.
   return array();
 }
 
 /**
- * New style naming for the punctuation chars
+ * New style naming for the punctuation chars.
  */
 function pathauto_update_4() {
   variable_set('pathauto_punctuation_quotes', variable_get('pathauto_quotes', 0));
@@ -98,7 +98,7 @@
 }
 
 /**
- * Remove the url_alias_extra table which wasn't used
+ * Remove the url_alias_extra table which wasn't used.
  */
 function pathauto_update_7() {
   $ret = array();
Index: pathauto.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.inc,v
retrieving revision 1.38
diff -u -r1.38 pathauto.inc
--- pathauto.inc	20 May 2008 18:09:08 -0000	1.38
+++ pathauto.inc	25 May 2008 08:52:24 -0000
@@ -2,10 +2,17 @@
 // $Id: pathauto.inc,v 1.38 2008/05/20 18:09:08 freso Exp $
 
 /**
- * @file
- * Miscellaneous functions for Pathauto
+ * @defgroup pathauto Pathauto functions
+ * @{
+ * Functions that automatically generate URL aliases for content.
+ *
+ * The Pathauto module automatically generates path aliases for various kinds of
+ * content (nodes, categories, users) without requiring the user to manually
+ * specify the path alias. This allows you to get aliases like
+ * /category/my-node-title.html instead of /node/123. The aliases are based upon
+ * a "pattern" system which the administrator can control.
  *
- * @ingroup pathauto
+ * @} End of "defgroup pathauto".
  */
 
 /**
@@ -78,13 +85,14 @@
 }
 
 /**
- * Returns old alias and pid if there is already an alias pointing to a different item
+ * Returns old alias and pid if there is already an alias
+ * pointing to a different item.
  *
  * @param string $src
- *   A string that is the internal path
+ *   A string that is the internal path.
  * @return
- *    An array with the keys "pid" and "old_alias" containing the "pid" and old
- *    "alias", respectively, of the old alias.
+ *   An array with the keys "pid" and "old_alias" containing the "pid" and old
+ *   "alias", respectively, of the old alias.
  */
 function _pathauto_existing_alias_data($src) {
   $output = array(
@@ -95,15 +103,15 @@
   if ($data = db_fetch_object($result)) {
     // The item is already aliased, check what to do...
     switch (variable_get('pathauto_update_action', 2)) {
-      // Replace old alias - remember the pid to update
+      // Replace old alias - remember the pid to update.
       case 2:
       case 3:
         $output['pid'] = $data->pid;
-      // Add new alias in addition to old one
+      // Add new alias in addition to old one.
       case 1:
         $output['old_alias'] = $data->dst;
         break;
-      // Do nothing
+      // Do nothing.
       case 0:
       default:
         break;
@@ -113,8 +121,9 @@
 }
 
 /**
- * Clean up a string value provided by a module, resulting in a
- * string containing only alphanumerics and separators
+ * Clean up a string value provided by a module.
+ *
+ * Resulting string contains only alphanumerics and separators.
  *
  * @param $string
  *   A string to clean.
@@ -124,7 +133,7 @@
  *   The cleaned string.
  */
 function pathauto_cleanstring($string, $clean_slash = TRUE) {
-  // Default words to ignore
+  // Default words to ignore.
   $ignore_words = array(
     'a', 'an', 'as', 'at', 'before', 'but', 'by', 'for', 'from',
     'is', 'in', 'into', 'like', 'of', 'off', 'on', 'onto', 'per',
@@ -132,25 +141,26 @@
     'with',
   );
 
-  // Replace or drop punctuation based on user settings
+  // Replace or drop punctuation based on user settings.
   $separator = variable_get('pathauto_separator', '-');
   $output = $string;
   $punctuation = pathauto_punctuation_chars();
   foreach ($punctuation as $name => $details) {
     $action = variable_get('pathauto_punctuation_'. $name, 0);
-    // 2 is the action for "do nothing" with the punctuation
+    // 2 is the action for "do nothing" with the punctuation.
     if ($action != 2) {
-      // Slightly tricky inline if which either replaces with the separator or nothing
+      // Slightly tricky inline if which either replaces
+      // with the separator or nothing.
       $output = str_replace($details['value'], ($action ? $separator : ''), $output);
     }
   }
 
-  // If something is already urlsafe then don't remove slashes
+  // If something is already urlsafe then don't remove slashes.
   if ($clean_slash) {
     $output = str_replace('/', '', $output);
   }
 
-  // Optionally remove accents and transliterate
+  // Optionally remove accents and transliterate.
   if (variable_get('pathauto_transliterate', FALSE)) {
     static $i18n_loaded = false;
     static $translations = array();
@@ -166,13 +176,13 @@
     $output = strtr($output, $translations);
   }
 
-  // Reduce to the subset of ASCII96 letters and numbers
+  // Reduce to the subset of ASCII96 letters and numbers.
   if (variable_get('pathauto_reduce_ascii', FALSE)) {
     $pattern = '/[^a-zA-Z0-9\/]+/ ';
     $output = preg_replace($pattern, $separator, $output);
   }
 
-  // Get rid of words that are on the ignore list
+  // Get rid of words that are on the ignore list.
   $ignore_re = "\b". preg_replace('/,/', "\b|\b", variable_get('pathauto_ignore_words', $ignore_words)) ."\b";
 
   if (function_exists('mb_eregi_replace')) {
@@ -194,16 +204,16 @@
     else {
       $seppattern = '\\'. $separator;
     }
-    // Trim any leading or trailing separators (note the need to
+    // Trim any leading or trailing separators (note the need to).
     $output = preg_replace("/^$seppattern+|$seppattern+$/", '', $output);
 
-    // Replace multiple separators with a single one
+    // Replace multiple separators with a single one.
     $output = preg_replace("/$seppattern+/", "$separator", $output);
 
   }
 
 
-  // Enforce the maximum component length
+  // Enforce the maximum component length.
   $maxlength = min(variable_get('pathauto_max_component_length', 100), 128);
   $output = drupal_substr($output, 0, $maxlength);
 
@@ -217,17 +227,17 @@
  *   The name of your module (e.g., 'node')
  * @param $op
  *   Operation being performed on the content being aliased ('insert',
- *   'update', or 'bulkupdate')
+ *   'update', or 'bulkupdate').
  * @param $placeholders
  *   An array whose keys consist of the translated placeholders
  *   which appear in patterns (e.g., t('[title]')) and values are the
- *   actual values to be substituted into the pattern (e.g., $node->title)
+ *   actual values to be substituted into the pattern (e.g., $node->title).
  * @param $src
- *   The "real" URI of the content to be aliased (e.g., "node/$node->nid")
+ *   The "real" URI of the content to be aliased (e.g., "node/$node->nid").
  * @param $type
  *   For modules which provided patternitems in hook_pathauto(),
  *   the relevant identifier for the specific item to be aliased (e.g.,
- *   $node->type)
+ *   $node->type).
  * @param $language
  *   A string specify the path's language.
  * @return
@@ -241,7 +251,7 @@
     $verbose = FALSE;
   }
 
-  // Retrieve and apply the pattern for this content type
+  // Retrieve and apply the pattern for this content type.
   $pattern = '';
   if (!empty($type)) {
     if (!empty($language)) {
@@ -254,7 +264,7 @@
   if (!$pattern) {
     $pattern = trim(variable_get('pathauto_'. $module .'_pattern', ''));
   }
-  // No pattern? Do nothing (otherwise we may blow away existing aliases...)
+  // No pattern? Do nothing (otherwise we may blow away existing aliases.).
   if (!$pattern) {
     return '';
   }
@@ -276,7 +286,7 @@
   $old_alias = NULL;
   if ($op == 'update' or $op == 'bulkupdate') {
     if (variable_get('pathauto_update_action', 2) == 0) {
-      // Do nothing
+      // Do nothing.
       return '';
     }
     $update_data = _pathauto_existing_alias_data($src);
@@ -285,32 +295,32 @@
   }
 
   // Replace the placeholders with the values provided by the module,
-  // and optionally lower-case the result
+  // and optionally lower-case the result.
   $alias = str_replace($placeholders['tokens'], $placeholders['values'], $pattern);
 
   if (variable_get('pathauto_case', 1)) {
     $alias = drupal_strtolower($alias);
   }
 
-  // Two or more slashes should be collapsed into one
+  // Two or more slashes should be collapsed into one.
   $alias = preg_replace("/\/+/", '/', $alias);
 
-  // Trim any leading or trailing slashes
+  // Trim any leading or trailing slashes.
   $alias = preg_replace("/^\/|\/+$/", '', $alias);
 
   $maxlength = min(variable_get('pathauto_max_length', 100), 128);
   $alias = drupal_substr($alias, 0, $maxlength);
 
-  // If the alias already exists, generate a new, hopefully unique, variant
+  // If the alias already exists, generate a new, hopefully unique, variant.
   $separator = variable_get('pathauto_separator', '-');
   if (_pathauto_alias_exists($alias, $src, $language)) {
     $original_alias = $alias;
     for ($i = 0; _pathauto_alias_exists(drupal_substr($alias, 0, $maxlength - strlen($i)) . $separator . $i, $src, $language); $i++) {
     }
-    // Make room for the sequence number
+    // Make room for the sequence number.
     $alias = drupal_substr($alias, 0, $maxlength - strlen($i));
     $alias = $alias . $separator . $i;
-    // If verbose is on, alert the user why this happened
+    // If verbose is on, alert the user why this happened.
     if ($verbose) {
       drupal_set_message(t('The automatically generated alias %original_alias conflicted with an existing alias. Alias changed to %alias.',
         array('%original_alias' => $original_alias, '%alias' => $alias)));
@@ -318,15 +328,16 @@
   }
 
   // If $pid is NULL, a new alias is created - otherwise, the existing
-  // alias for the designated src is replaced
+  // alias for the designated src is replaced.
   _pathauto_set_alias($src, $alias, $module, $entity_id, $pid, $verbose, $old_alias, $language);
 
   // Also create a related feed alias if requested, and if supported
-  // by the module
+  // by the module.
   if (strlen(variable_get('pathauto_'. $module .'_applytofeeds', ''))) {
     $feedappend = variable_get('pathauto_'. $module .'_applytofeeds', '');
 
-    // For forums and taxonomies, the src doesn't always form the base of the rss feed (ie. image galleries)
+    // For forums and taxonomies, the src doesn't always form
+    // the base of the rss feed (ie. image galleries).
     if ($module == 'taxonomy' || $module == 'forum') {
       $update_data = _pathauto_existing_alias_data("taxonomy/term/$entity_id/$feedappend");
       _pathauto_set_alias("taxonomy/term/$entity_id/$feedappend", "$alias/feed", $module, $entity_id, $update_data['pid'], $verbose, $update_data['old_alias'], $language);
@@ -341,12 +352,12 @@
 }
 
 /**
- * Verifies if the given path is a valid menu callback.
+ * Verify wether given path is a valid menu callback.
+ *
  * Taken from menu_execute_active_handler().
  *
  * @param $path
  *   A string containing a relative path.
- *
  * @return
  *   TRUE if the path already exists.
  */
@@ -359,7 +370,7 @@
 }
 
 /**
- * Private function for pathauto to create an alias
+ * Private function for pathauto to create an alias.
  *
  * @param $src
  *   The internal path.
@@ -375,14 +386,15 @@
  *   The path's language.
  */
 function _pathauto_set_alias($src, $dst, $entity_type, $entity_id, $pid = NULL, $verbose = FALSE, $old_alias = NULL, $language = '') {
-  // Alert users that an existing callback cannot be overridden automatically
+  // Alert users that an existing callback cannot be overridden automatically.
   if (_pathauto_path_is_callback($dst)) {
     if ($verbose and user_access('notify of path changes')) {
       drupal_set_message(t('Ignoring alias %dst due to existing path conflict.', array('%dst' => $dst)));
     }
     return;
   }
-  // Alert users if they are trying to create an alias that is the same as the internal path
+  // Alert users if they are trying to create an alias
+  // that is the same as the internal path.
   if ($src == $dst) {
     if ($verbose and user_access('notify of path changes')) {
       drupal_set_message(t('Ignoring alias %dst because it is the same as the internal path.', array('%dst' => $dst)));
@@ -390,7 +402,7 @@
     return;
   }
 
-  // Skip replacing the current alias with an identical alias
+  // Skip replacing the current alias with an identical alias.
   if ($old_alias != $dst) {
     path_set_alias($src, $dst, $pid, $language);
 
@@ -398,7 +410,7 @@
       if (isset($old_alias) && strlen($old_alias)) {
         $save['path'] = $old_alias;
         $save['redirect'] = $src;
-        $save['type'] = 301; //moved permanently
+        $save['type'] = 301; // Moved permanently.
         path_redirect_save($save);
         $redirect = TRUE;
       }
@@ -418,13 +430,13 @@
 }
 
 /**
- * Generalized function to get tokens across all Pathauto types
+ * Generalized function to get tokens across all Pathauto types.
  *
  * @param $object
  *   A user, node, or category object.
- *
  * @return
- *   tokens for that object formatted in the way that Pathauto expects to see them.
+ *   Tokens for that object formatted in the way that
+ *   Pathauto expects to see them.
  */
 function pathauto_get_placeholders($type, $object) {
   if (function_exists('token_get_values')) {
@@ -433,22 +445,23 @@
     $values = pathauto_clean_token_values($full);
     return array('tokens' => $tokens, 'values' => $values);
   }
-  // TODO at some point try removing this and see if install profiles have problems again.
+  // TODO: At some point try removing this and see
+  // if install profiles have problems again.
   watchdog('Pathauto', 'It appears that you have installed Pathauto, which depends on token, but token is either not installed or not installed properly.');
   return array('tokens' => array(), 'values' => array());
 }
 
 /**
- * Cleans tokens so they are URL friendly
+ * Cleans tokens so they are URL friendly.
  *
  * @param $full
  *   An array of token values that need to be "cleaned" for use in the URL.
  * @return
- *   TODO: $full->values == ?
+ *   An array of the cleaned tokens.
  */
 function pathauto_clean_token_values($full) {
   foreach ($full->values as $key => $value) {
-    // If it's a "path" or "url friendly" token don't remove the "/" character
+    // If it's a "path" or "url friendly" token don't remove the "/" character.
     if (substr($full->tokens[$key], -4, 4) === 'path' || substr($full->tokens[$key], -8, 8) === 'path-raw' || substr($full->tokens[$key], -5, 5) === 'alias') {
       $full->values[$key] = pathauto_cleanstring($value, FALSE);
     }
@@ -460,8 +473,8 @@
 }
 
 /**
- * Returns an array of arrays for punctuation values.
- * 
+ * Return an array of arrays for punctuation values.
+ *
  * Returns an array of arrays for punctuation values keyed by a name, including
  * the value and a textual description.
  * Can and should be expanded to include "all" non text punctuation values.
Index: pathauto_taxonomy.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto_taxonomy.inc,v
retrieving revision 1.36
diff -u -r1.36 pathauto_taxonomy.inc
--- pathauto_taxonomy.inc	24 May 2008 08:58:58 -0000	1.36
+++ pathauto_taxonomy.inc	25 May 2008 08:52:25 -0000
@@ -1,8 +1,15 @@
 <?php
 // $Id: pathauto_taxonomy.inc,v 1.36 2008/05/24 08:58:58 freso Exp $
 
-/*
- * Implementation of hook_pathauto() for taxonomy module
+/**
+ * @file
+ * Hook implementations for taxonomy module integration.
+ *
+ * @ingroup pathauto
+ */
+
+/**
+ * Implementation of hook_pathauto().
  */
 function taxonomy_pathauto($op) {
   switch ($op) {
@@ -44,19 +51,19 @@
 }
 
 /**
- * Generate aliases for all categories without aliases
+ * Generate aliases for all categories without aliases.
  */
 function taxonomy_pathauto_bulkupdate() {
-  // From all node types, only attempt to update those with patterns
+  // From all node types, only attempt to update those with patterns.
   $pattern_vids = array();
   $vid_where = '';
   foreach (taxonomy_get_vocabularies() as $vid => $info) {
     $pattern = '';
     $pattern = variable_get('pathauto_taxonomy_'. $vid .'_pattern', '');
 
-    // If it's not set, check the default
-    // TODO - if there's a default we shouldn't do this crazy where statement because all vocabs get aliases
-    // TODO - special casing to exclude the forum vid (and the images vid and...?)
+    // If it's not set, check the default.
+    // TODO: If there's a default we shouldn't do this crazy where statement because all vocabs get aliases.
+    // TODO: Special casing to exclude the forum vid (and the images vid and...?).
     if (!trim($pattern)) {
       $pattern = variable_get('pathauto_taxonomy_pattern', '');
     }
@@ -72,7 +79,8 @@
   }
   $vid_where .= ')';
 
-  // Exclude the forums and join all the args into one array so they can be passed to db_query
+  // Exclude the forums and join all the args into one array
+  // so they can be passed to db_query.
   $forum_vid[] = variable_get('forum_nav_vocabulary', '');
   $query_args = array_merge($forum_vid, $pattern_vids);
   $query = "SELECT tid, vid, name, src, dst FROM {term_data} LEFT JOIN {url_alias} ON CONCAT('taxonomy/term/', CAST(tid AS CHAR)) = src WHERE src IS NULL AND vid <> %d ". $vid_where;
@@ -90,9 +98,10 @@
 }
 
 /**
- * Function to create aliases for taxonomy objects
+ * Create aliases for taxonomy objects.
  *
- * @param object $category a taxonomy object
+ * @param $category
+ *   A taxonomy object.
  */
 function _taxonomy_pathauto_alias($category, $op) {
   $count = 0;
@@ -100,7 +109,8 @@
   $placeholders = pathauto_get_placeholders('taxonomy', $category);
 
   $forum_vid = variable_get('forum_nav_vocabulary', '');
-  // If we're in a forum vocabulary, also create a forum container, forum, or forum topic alias.
+  // If we're in a forum vocabulary, also create a forum container,
+  // forum, or forum topic alias.
   if (module_exists('forum') && $forum_vid == (int)$category->vid) {
     $src = 'forum/'. $category->tid;
     if ($alias = pathauto_create_alias('forum', $op, $placeholders, $src, $category->tid, $category->vid)) {
@@ -117,8 +127,8 @@
 }
 
 
-/*
- * Implementation of hook_pathauto() for forum module
+/**
+ * Implementation of hook_pathauto().
  */
 function forum_pathauto($op) {
   switch ($op) {
@@ -148,7 +158,7 @@
 
 
 /**
- * Generate aliases for all forums and forum containers without aliases
+ * Generate aliases for all forums and forum containers without aliases.
  */
 function forum_pathauto_bulkupdate() {
   $forum_vid = variable_get('forum_nav_vocabulary', '');
Index: pathauto.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.admin.inc,v
retrieving revision 1.6
diff -u -r1.6 pathauto.admin.inc
--- pathauto.admin.inc	20 May 2008 18:09:08 -0000	1.6
+++ pathauto.admin.inc	25 May 2008 08:52:24 -0000
@@ -3,31 +3,34 @@
 
 /**
  * @file
- * Functions for Pathauto's admin pages.
+ * Admin page callbacks for the pathauto module.
  *
  * @ingroup pathauto
  */
 
 /**
- * Callback for admin settings page.
+ * Form builder; Configure the pathauto system.
+ *
+ * @ingroup forms
+ * @see system_settings_form()
  */
 function pathauto_admin_settings() {
   _pathauto_include();
 
-  // Make sure they have token
+  // Make sure they have token.
   if (!function_exists('token_get_list')) {
     drupal_set_message(t('It appears that the <a href="@token_link">Token module</a> is not installed. Please ensure that you have it installed so that Pathauto can work properly. You may need to disable Pathauto and re-enable it to get Token enabled.', array('@token_link' => 'http://drupal.org/project/token')), 'error');
     return;
   }
 
-  // Default words to ignore
+  // Default words to ignore.
   $ignore_words = array(
     'a', 'an', 'as', 'at', 'before', 'but', 'by', 'for', 'from', 'is', 'in',
     'into', 'like', 'of', 'off', 'on', 'onto', 'per', 'since', 'than', 'the',
     'this', 'that', 'to', 'up', 'via', 'with',
   );
 
-  // Generate the form - settings applying to all patterns first
+  // Generate the form - settings applying to all patterns first.
   $group_weight = -20;
   $form['general'] = array(
     '#type' => 'fieldset',
@@ -60,7 +63,7 @@
     '#default_value' => variable_get('pathauto_case', 1),
     '#options' => array(t('Leave case the same as source token values.'), t('Change to lower case')),
   );
-    
+
   $form['general']['pathauto_max_length'] = array(
     '#type' => 'textfield',
     '#title' => t('Maximum alias length'),
@@ -97,8 +100,8 @@
     $actions[] = t('Create a new alias. Redirect from old alias.');
   }
   elseif (variable_get('pathauto_update_action', 2) == 3) {
-    // the redirect action is selected, but path_redirect is not enabled
-    // let's set the variable back to the default
+    // The redirect action is selected, but path_redirect is not enabled.
+    // Let's set the variable back to the default.
     variable_set('pathauto_update_action', 2);
   }
 
@@ -118,7 +121,7 @@
     $transliteration_help = t('When a pattern includes certain characters (such as those with accents) should Pathauto attempt to transliterate them into the ASCII-96 alphabet? Transliteration is determined by the i18n-ascii.txt file in the Pathauto directory.');
   }
   else {
-    // Perhaps they've removed the file, set the transliterate option to FALSE
+    // Perhaps they've removed the file, set the transliterate option to FALSE.
     variable_set('pathauto_transliterate', FALSE);
   }
   $form['general']['pathauto_transliterate'] = array(
@@ -159,7 +162,7 @@
     );
   }
 
-  // Call the hook on all modules - an array of 'settings' objects is returned
+  // Call the hook on all modules - an array of 'settings' objects is returned.
   $all_settings = module_invoke_all('pathauto', 'settings');
   $modulelist = '';
   $indexcount = 0;
@@ -182,7 +185,7 @@
     );
     $group_weight++;
 
-    // Prompt for the default pattern for this module
+    // Prompt for the default pattern for this module.
     $variable = 'pathauto_'. $module .'_pattern';
     $description = '';
     if (!count($_POST)) {
@@ -200,7 +203,7 @@
       '#maxlength' => 1280);
 
     // If the module supports a set of specialized patterns, set
-    // them up here
+    // them up here.
     if (isset($settings->patternitems)) {
       foreach ($settings->patternitems as $itemname => $itemlabel) {
         $variable = 'pathauto_'. $module .'_'. $itemname .'_pattern';
@@ -222,7 +225,7 @@
     }
 
     // Display the user documentation of placeholders supported by
-    // this module, as a description on the last pattern
+    // this module, as a description on the last pattern.
     $doc = "<dl>\n";
     foreach ($settings->placeholders as $name => $description) {
       $doc .= '<dt>'. $name .'</dt>';
@@ -241,7 +244,7 @@
     );
 
 
-    // If the module supports bulk updates, offer the update action here
+    // If the module supports bulk updates, offer the update action here.
     if ($settings->bulkname) {
       $variable = 'pathauto_'. $module .'_bulkupdate';
       if (variable_get($variable, FALSE)) {
@@ -257,11 +260,12 @@
       );
     }
 
-    // If the module supports feeds, offer to generate aliases for them
+    // If the module supports feeds, offer to generate aliases for them.
     if ($supportsfeeds) {
       $variable = 'pathauto_'. $module .'_applytofeeds';
       $current = variable_get($variable, $supportsfeeds);
-      // This checks for the old style from 2.0 and earlier. TODO: At some point we can drop that.
+      // This checks for the old style from 2.0 and earlier.
+      // TODO: At some point we can drop that.
       if (is_numeric($current)) {
         $current = $supportsfeeds;
       }
@@ -284,29 +288,33 @@
       'Bulk generation of index aliases completed, @count aliases generated.'));
   }
 
-  // Keep track of which modules currently support pathauto
+  // Keep track of which modules currently support pathauto.
   variable_set('pathauto_modulelist', $modulelist);
 
   return system_settings_form($form);
 }
 
 /**
- * Helper function to see if they are using all -raw tokens available
+ * Helper function for pathauto_admin_settings().
+ *
+ * See if they are using all -raw tokens available
+ * and if all the tokens are valid in the given context.
  *
  * @param $pattern
- *   TODO: What does this do?
+ *   A string containing the pattern to be tested.
  * @param $type
  *   A flag indicating the class of substitution tokens to use.
  * @return
  *   A status flag, telling whether there is an error or not.
- * @see function token_get_list for more information on the $type parameter.
+ * @see token_get_list()
+ *   For more information on the $type parameter.
  */
 function _pathauto_check_pattern($pattern, $type) {
-  // Hold items we've warned about so we only warn once per token
+  // Hold items we've warned about so we only warn once per token.
   static $warned;
   $return = FALSE;
 
-  // Build up a set of all tokens in a format that's easy to search
+  // Build up a set of all tokens in a format that's easy to search.
   $all_tokens = array();
   $tokens = token_get_list($type);
   foreach ($tokens as $actual_tokens) {
@@ -351,11 +359,13 @@
 }
 
 /**
- * Validate Pathauto's admin settings form data.
+ * Validate pathauto_admin_settings form submissions.
  */
 function pathauto_admin_settings_validate($form, &$form_state) {
-  // Validate that the separator is not set to be removed per http://drupal.org/node/184119
-  // This isn't really all that bad so warn, but still allow them to save the value.
+  // Validate that the separator is not set to be
+  // removed per http://drupal.org/node/184119.
+  // This isn't really all that bad so warn,
+  // but still allow them to save the value.
   $separator = $form_state['values']['pathauto_separator'];
   $punctuation = pathauto_punctuation_chars();
   foreach ($punctuation as $name => $details) {
@@ -369,20 +379,21 @@
 }
 
 /**
- * Menu callback: select certain alias types to delete
+ * Menu callback; select certain alias types to delete.
  */
 function pathauto_admin_delete() {
-  /* TODO:
-   1) all - DONE
-   2) all node aliases - DONE
-   4) all user aliases - DONE
-   5) all taxonomy aliases - DONE
-   6) by node type
-   7) by taxonomy vocabulary
-   8) no longer existing aliases (see http://drupal.org/node/128366 )
-   9) where src like 'pattern' - DON'T DO
-   10) where dst like 'pattern' - DON'T DO
-  */
+  /**
+   * TODO:
+   *   1) all - DONE
+   *   2) all node aliases - DONE
+   *   4) all user aliases - DONE
+   *   5) all taxonomy aliases - DONE
+   *   6) by node type
+   *   7) by taxonomy vocabulary
+   *   8) no longer existing aliases (see http://drupal.org/node/128366 )
+   *   9) where src like 'pattern' - DON'T DO
+   *  10) where dst like 'pattern' - DON'T DO
+   */
 
   $form = array();
   $form['delete'] = array(
@@ -392,7 +403,7 @@
     '#collapsed' => FALSE,
   );
 
-  // First we do the "all" case
+  // First we do the "all" case.
   $total_count = db_result(db_query('SELECT count(1) FROM {url_alias}'));
   $form['delete']['all_aliases'] = array(
     '#type' => 'checkbox',
@@ -401,19 +412,20 @@
     '#description' => t('Delete all aliases. Number of aliases which will be deleted: %count.', array('%count' => $total_count)),
   );
 
-  // Next, iterate over an array of objects/alias types which can be deleted and provide checkboxes
+  // Next, iterate over an array of objects/alias types
+  // which can be deleted and provide checkboxes.
   $objects = module_invoke_all('path_alias_types');
   foreach ($objects as $internal_name => $label) {
     $count = db_result(db_query("SELECT count(1) FROM {url_alias} WHERE src LIKE '%s%%'", $internal_name));
     $form['delete'][$internal_name] = array(
       '#type' => 'checkbox',
-      '#title' => $label, // This label is sent through t() in the hard coded function where it is defined
+      '#title' => $label, // This label is sent through t() in the hard coded function where it is defined.
       '#default_value' => FALSE,
       '#description' => t('Delete aliases for all @label. Number of aliases which will be deleted: %count.', array('@label' => $label, '%count' => $count)),
     );
   }
 
-  // Warn them and give a button that shows we mean business
+  // Warn them and give a button that shows we mean business.
   $form['warning'] = array('#value' => t('<p><strong>Note:</strong> there is no confirmation. Be sure of your action before clicking the "Delete aliases now!" button.<br />You may want to make a backup of the database and/or the url_alias table prior to using this feature.</p>'));
   $form['buttons']['submit'] = array(
     '#type' => 'submit',
@@ -424,7 +436,7 @@
 }
 
 /**
- * Submit handler for the bulk delete form
+ * Process pathauto_admin_delete form submissions.
  */
 function pathauto_admin_delete_submit($form, &$form_state) {
   foreach ($form_state['values'] as $key => $value) {
Index: pathauto.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto.module,v
retrieving revision 1.110
diff -u -r1.110 pathauto.module
--- pathauto.module	20 May 2008 18:09:08 -0000	1.110
+++ pathauto.module	25 May 2008 08:52:25 -0000
@@ -2,18 +2,8 @@
 // $Id: pathauto.module,v 1.110 2008/05/20 18:09:08 freso Exp $
 
 /**
- * @defgroup pathauto Pathauto: Automatically generates aliases for content
- *
- * The Pathauto module automatically generates path aliases for various kinds of
- * content (nodes, categories, users) without requiring the user to manually
- * specify the path alias. This allows you to get aliases like
- * /category/my-node-title.html instead of /node/123. The aliases are based upon
- * a "pattern" system which the administrator can control.
- */
-
-/**
  * @file
- * TODO: Describe this the main file of Pathauto.
+ * Used to automatically generate aliases for content.
  *
  * @ingroup pathauto
  */
@@ -63,7 +53,7 @@
     'weight' => 10,
     'file' => 'pathauto.admin.inc',
   );
-  
+
   $items['admin/build/path/delete_bulk'] = array(
     'title' => 'Delete aliases',
     'page callback' => 'drupal_get_form',
@@ -88,7 +78,9 @@
 }
 
 /**
- * Implementation of hook_token_values() for Pathauto specific tokens
+ * Implementation of hook_token_values().
+ *
+ * Pathauto specific tokens.
  */
 function pathauto_token_values($type, $object = NULL) {
   if (module_exists('taxonomy')) {
@@ -99,10 +91,10 @@
           $vid = db_result(db_query_range("SELECT t.vid FROM {term_node} r INNER JOIN {term_data} t ON r.tid = t.tid INNER JOIN {vocabulary} v ON t.vid = v.vid WHERE r.nid = %d ORDER BY v.weight, t.weight, t.name", $object->nid, 0, 1));
           $category = db_fetch_object(db_query_range("SELECT t.tid, t.name FROM {term_data} t INNER JOIN {term_node} r ON r.tid = t.tid WHERE t.vid = %d AND r.nid = %d ORDER BY weight", $vid, $object->nid, 0, 1));
           $category->vid = $vid;
-          // In the realm of nodes these are terms, in the realm of Taxonomy, cats
+          // In the realm of nodes these are terms, in the realm of Taxonomy, cats.
           $label = 'term';
 
-          // We're on a node and it's a book and it has a parent? Get the book path alias
+          // We're on a node and it's a book and it has a parent? Get the book path alias.
           if (module_exists('book')) {
             if ($object->type == 'book' && $object->parent) {
               $values['bookpathalias'] = drupal_get_path_alias('node/'. $object->parent);
@@ -127,13 +119,13 @@
             $catpath = '';
             $catpath_raw = '';
             foreach ($parents as $parent) {
-              // Replace any / characters in individual terms which might create confusing URLs
+              // Replace any / characters in individual terms which might create confusing URLs.
               $catpath = pathauto_cleanstring(check_plain(preg_replace('/\//', '', $parent->name))) .'/'. $catpath;
               $catpath_raw = pathauto_cleanstring(preg_replace('/\//', '', $parent->name)) .'/'. $catpath_raw;
             }
             $values[$label .'path'] = $catpath .'/'. check_plain($category->name);
             $values[$label .'path-raw'] = $catpath_raw .'/'. $category->name;
-            
+
             $values[$label .'alias'] = drupal_get_path_alias('taxonomy/term/'. $category->tid);
             if (!strncasecmp($values[$label .'alias'], 'taxonomy', 8)) {
               $values[$label .'alias'] = check_plain($category->name);
@@ -151,7 +143,9 @@
 }
 
 /**
- * Implementation of hook_token_list() for Pathauto specific tokens
+ * Implementation of hook_token_list().
+ *
+ * Pathauto specific tokens.
  */
 function pathauto_token_list($type = 'all') {
   $tokens = array();
@@ -176,7 +170,9 @@
 }
 
 /**
- * TODO: What does this do? One-line description.
+ * Implementation of hook_path_alias_types().
+ *
+ * Used primarily by the bulk delete form.
  */
 function pathauto_path_alias_types() {
   $objects = array('user/' => t('users'), 'node/' => t('content'));
@@ -196,8 +192,9 @@
   return $objects;
 }
 
-//==============================================================================
-// Some node related functions.
+/**
+ * Node module related functions.
+ */
 
 /**
  * Implementation of hook_nodeapi().
@@ -207,7 +204,7 @@
   if (module_exists('path')) {
     switch ($op) {
       case 'presave':
-        // About to be saved (before insert/update)
+        // About to be saved (before insert/update).
         if (isset($node->pathauto_perform_alias) && isset($node->old_alias)
             && $node->pathauto_perform_alias && $node->path == '' && $node->old_alias != '') {
           /**
@@ -221,7 +218,7 @@
         break;
       case 'insert':
       case 'update':
-        // Get the specific pattern or the default
+        // Get the specific pattern or the default.
         if (!empty($node->language)) {
           $pattern = variable_get('pathauto_node_'. $node->type .'_'. $node->language .'_pattern', FALSE);
         }
@@ -231,9 +228,9 @@
             $pattern = variable_get('pathauto_node_pattern', FALSE);
           }
         }
-        // Only do work if there's a pattern
+        // Only do work if there's a pattern.
         if ($pattern) {
-          // Only create an alias if the checkbox was not provided or if the checkbox was provided and is checked
+          // Only create an alias if the checkbox was not provided or if the checkbox was provided and is checked.
           if (!isset($node->pathauto_perform_alias) || $node->pathauto_perform_alias) {
             $placeholders = pathauto_get_placeholders('node', $node);
             $src = "node/$node->nid";
@@ -259,9 +256,9 @@
  * into the path module's fieldset in the node form.
  */
 function pathauto_form_alter(&$form, $form_state, $form_id) {
-  // Only do this for node forms
+  // Only do this for node forms.
   if (isset($form['#id']) && ($form['#id'] == 'node-form') && arg(0) == 'node') {
-    // See if there is a pathauto pattern or default applicable
+    // See if there is a pathauto pattern or default applicable.
     if (isset($form['language'])) {
       $language = isset($form['language']['#value']) ? $form['language']['#value'] : $form['language']['#default_value'];
       $pattern = variable_get('pathauto_node_'. $form['type']['#value'] .'_'. $language .'_pattern', FALSE);
@@ -272,7 +269,8 @@
         $pattern = variable_get('pathauto_node_pattern', FALSE);
       }
     }
-    // If there is a pattern AND the user is allowed to create aliases AND the path textbox is present on this form
+    // If there is a pattern AND the user is allowed
+    // to create aliases AND the path textbox is present on this form.
     if ($pattern && user_access('create url aliases') && isset($form['path']['path'])) {
       $output = t('An alias will be generated for you. If you wish to create your own alias below, untick this option.');
       if (user_access('administer pathauto')) {
@@ -290,7 +288,8 @@
         '#weight' => 0
       );
 
-      //For Pathauto to remember the old alias and prevent the Path-module from deleteing it when Pathauto wants to preserve it
+      // For Pathauto to remember the old alias and prevent the Path module
+      // from deleteing it when Pathauto wants to preserve it.
       $old_alias = $form['path']['path']['#default_value'];
       $form['path']['old_alias'] = array('#type' => 'value', '#value' => $old_alias);
     }
@@ -324,8 +323,10 @@
   }
 }
 
-//==============================================================================
-// Taxonomy related functions.
+/**
+ * Taxonomy module related functions.
+ */
+
 /**
  * Implementation of hook_taxonomy().
  */
@@ -336,20 +337,20 @@
       switch ($op) {
         case 'insert':
         case 'update':
-          // Use the category info to automatically create an alias
+          // Use the category info to automatically create an alias.
           $category = (object) $object;
           if ($category->name) {
             $count = _taxonomy_pathauto_alias($category, $op);
           }
 
-          // For all children generate new alias (important if [catpath] used)
+          // For all children generate new alias (important if [catpath] used).
           foreach (taxonomy_get_tree($category->vid, $category->tid) as $subcategory) {
             $count = _taxonomy_pathauto_alias($subcategory, $op);
           }
 
           break;
         case 'delete':
-          // If the category is deleted, remove the path aliases
+          // If the category is deleted, remove the path aliases.
           $category = (object) $object;
           path_set_alias('taxonomy/term/'. $category->tid);
           path_set_alias(taxonomy_term_path($category));
@@ -365,18 +366,21 @@
   }
 }
 
-//==============================================================================
-// User related functions.
+/**
+ * User module related functions.
+ */
 
 /**
- * Implementation of hook_user() for users, trackers, and blogs
+ * Implementation of hook_user().
+ *
+ * For users, trackers, and blogs.
  */
 function pathauto_user($op, &$edit, &$user, $category = FALSE) {
   _pathauto_include();
   switch ($op) {
     case 'insert':
     case 'update':
-      // Use the username to automatically create an alias
+      // Use the username to automatically create an alias.
       $pathauto_user = (object) array_merge((array) $user, $edit);
       if ($user->name) {
         $placeholders = pathauto_get_placeholders('user', $pathauto_user);
@@ -403,11 +407,12 @@
       }
       break;
     case 'delete':
-      // If the user is deleted, remove the path aliases
+      // If the user is deleted, remove the path aliases.
       $user = (object) $user;
       path_set_alias('user/'. $user->uid);
 
-      // They may have enabled these modules and/or feeds when the user was created, so let's try to delete all of them
+      // They may have enabled these modules and/or feeds
+      // when the user was created, so let's try to delete all of them.
       path_set_alias('blog/'. $user->uid);
       path_set_alias('blog/'. $user->uid .'/feed');
       path_set_alias('user/'. $user->uid .'/track');
Index: pathauto_user.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/pathauto/pathauto_user.inc,v
retrieving revision 1.27
diff -u -r1.27 pathauto_user.inc
--- pathauto_user.inc	20 May 2008 18:09:09 -0000	1.27
+++ pathauto_user.inc	25 May 2008 08:52:25 -0000
@@ -3,13 +3,13 @@
 
 /**
  * @file
- * User hooked into Pathauto. (TODO: Better description!)
+ * Hook implementations for user module integration.
  *
  * @ingroup pathauto
  */
 
 /**
- * Implementation of hook_pathauto() for user aliases.
+ * Implementation of hook_pathauto().
  */
 function user_pathauto($op) {
   switch ($op) {
@@ -38,7 +38,7 @@
 }
 
 /**
- * Implementation of hook_pathauto() for blog aliases.
+ * Implementation of hook_pathauto().
  */
 function blog_pathauto($op) {
   switch ($op) {
@@ -63,7 +63,7 @@
 }
 
 /**
- * Implementation of hook_pathauto() for user-tracker aliases.
+ * Implementation of hook_pathauto().
  */
 function tracker_pathauto($op) {
   switch ($op) {
@@ -135,7 +135,8 @@
  * Bulk generate aliases for user trackers without aliases.
  */
 function tracker_pathauto_bulkupdate() {
-  // We do the double CONCAT because Pgsql8.1 doesn't support more than three arguments to CONCAT
+  // We do the double CONCAT because PostgreSQL 8.1 doesn't support
+  // more than three arguments to CONCAT.
   // Hopefully some day we can remove that.
   $query = "SELECT uid, name, src, dst FROM {users} LEFT JOIN {url_alias} ON CONCAT(CONCAT('user/', CAST(uid AS CHAR)), '/track') = src WHERE uid > 0 AND src IS NULL";
   $result = db_query_range($query, 0, variable_get('pathauto_max_bulk_update', 50));
