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 27 May 2008 20:21:53 -0000 @@ -3,7 +3,7 @@ /** * @file - * Node hooked into Pathauto. (TODO: Better description!) + * Hook implementations for node module integration. * * @ingroup pathauto */ 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 27 May 2008 20:21:53 -0000 @@ -3,7 +3,7 @@ /** * @file - * Provides install, update, and uninstall functions for Pathauto. + * Install, update, and uninstall functions for Pathauto. * * @ingroup pathauto */ @@ -45,7 +45,7 @@ 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 @@ -55,7 +55,7 @@ // Clear the cache to get these to take effect. cache_clear_all(); } - + /** * Implementation of hook_uninstall(). */ @@ -66,7 +66,7 @@ } /** - * 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,11 +77,11 @@ /** * 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 @@ -89,7 +89,7 @@ } /** - * 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.40 diff -u -r1.40 pathauto.inc --- pathauto.inc 25 May 2008 21:17:17 -0000 1.40 +++ pathauto.inc 27 May 2008 20:21:52 -0000 @@ -3,25 +3,25 @@ /** * @file - * Miscellaneous functions for Pathauto + * Miscellaneous functions for Pathauto. * * @ingroup pathauto */ /** - * Copied from search.module's PREG_CLASS_SEARCH_EXCLUDE - * - * Matches Unicode character classes to exclude from the search index. + * Matches Unicode character classes. * * See: http://www.unicode.org/Public/UNIDATA/UCD.html#General_Category_Values * * The index only contains the following character classes: - * Lu Letter, Uppercase - * Ll Letter, Lowercase - * Lt Letter, Titlecase - * Lo Letter, Other - * Nd Number, Decimal Digit - * No Number, Other + * Lu Letter, Uppercase + * Ll Letter, Lowercase + * Lt Letter, Titlecase + * Lo Letter, Other + * Nd Number, Decimal Digit + * No Number, Other + * + * Copied from search.module's PREG_CLASS_SEARCH_EXCLUDE. */ define('PREG_CLASS_ALNUM', '\x{0}-\x{2f}\x{3a}-\x{40}\x{5b}-\x{60}\x{7b}-\x{bf}\x{d7}\x{f7}\x{2b0}-'. @@ -78,13 +78,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 + * @param $src + * 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( @@ -113,8 +114,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. @@ -202,7 +204,6 @@ } - // Enforce the maximum component length $maxlength = min(variable_get('pathauto_max_component_length', 100), 128); $output = drupal_substr($output, 0, $maxlength); @@ -214,20 +215,20 @@ * Apply patterns to create an alias. * * @param $module - * The name of your module (e.g., 'node') + * The name of your module (e.g., 'node'). * @param $op - * Operation being performed on the content being aliased ('insert', - * 'update', or 'bulkupdate') + * Operation being performed on the content being aliased + * ('insert', '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) + * For modules which provided pattern items in hook_pathauto(), + * the relevant identifier for the specific item to be aliased + * (e.g., $node->type). * @param $language * A string specify the path's language. * @return @@ -341,12 +342,12 @@ } /** - * Verifies if the given path is a valid menu callback. + * Verify if the 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 +360,7 @@ } /** - * Private function for pathauto to create an alias + * Private function for Pathauto to create an alias. * * @param $src * The internal path. @@ -418,13 +419,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')) { @@ -439,12 +440,12 @@ } /** - * Cleans tokens so they are URL friendly + * Clean 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) { @@ -460,8 +461,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 27 May 2008 20:21:54 -0000 @@ -1,8 +1,15 @@ 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'), @@ -291,15 +294,19 @@ } /** - * 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 @@ -351,7 +358,7 @@ } /** - * 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 @@ -369,7 +376,7 @@ } /** - * Menu callback: select certain alias types to delete + * Menu callback; select certain alias types to delete. */ function pathauto_admin_delete() { /* TODO: @@ -424,7 +431,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 27 May 2008 20:21:53 -0000 @@ -13,7 +13,7 @@ /** * @file - * TODO: Describe this the main file of Pathauto. + * Used to automatically generate path aliases for content. * * @ingroup pathauto */ @@ -63,7 +63,7 @@ 'weight' => 10, 'file' => 'pathauto.admin.inc', ); - + $items['admin/build/path/delete_bulk'] = array( 'title' => 'Delete aliases', 'page callback' => 'drupal_get_form', @@ -77,7 +77,7 @@ } /** - * Include all pathauto include files. + * Include all Pathauto include files. */ function _pathauto_include() { $pathauto_path = drupal_get_path('module', 'pathauto'); @@ -88,7 +88,7 @@ } /** - * Implementation of hook_token_values() for Pathauto specific tokens + * Implementation of hook_token_values() for Pathauto specific tokens. */ function pathauto_token_values($type, $object = NULL) { if (module_exists('taxonomy')) { @@ -133,7 +133,6 @@ } $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 +150,7 @@ } /** - * Implementation of hook_token_list() for Pathauto specific tokens + * Implementation of hook_token_list() for Pathauto specific tokens. */ function pathauto_token_list($type = 'all') { $tokens = array(); @@ -176,7 +175,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')); @@ -314,7 +315,7 @@ * Callback function for updating node aliases. * * @param $nodes - * TODO: What exactly is this and what is being done with it? + * Array of node nid's. */ function pathauto_node_operations_update($nodes) { foreach ($nodes as $nid) { @@ -326,6 +327,7 @@ //============================================================================== // Taxonomy related functions. + /** * Implementation of hook_taxonomy(). */ @@ -369,7 +371,7 @@ // User 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(); 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 27 May 2008 20:21:54 -0000 @@ -3,7 +3,7 @@ /** * @file - * User hooked into Pathauto. (TODO: Better description!) + * Hook implementations for user module integration. * * @ingroup pathauto */