Index: includes/path.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/path.inc,v retrieving revision 1.55 diff -u -p -r1.55 path.inc --- includes/path.inc 7 Jan 2010 04:54:18 -0000 1.55 +++ includes/path.inc 13 Jan 2010 16:11:53 -0000 @@ -456,11 +456,14 @@ function path_load($conditions) { function path_save(&$path) { $path += array('pid' => NULL, 'language' => LANGUAGE_NONE); + // Allow modules to alter the alias before saving. + drupal_alter('path', $path); + // Insert or update the alias. $status = drupal_write_record('url_alias', $path, (!empty($path['pid']) ? 'pid' : NULL)); // Verify that a record was written. - if (isset($status) && $status) { + if (!empty($status)) { if ($status === SAVED_NEW) { module_invoke_all('path_insert', $path); } Index: modules/locale/locale.module =================================================================== RCS file: /cvs/drupal/drupal/modules/locale/locale.module,v retrieving revision 1.281 diff -u -p -r1.281 locale.module --- modules/locale/locale.module 10 Jan 2010 19:06:47 -0000 1.281 +++ modules/locale/locale.module 13 Jan 2010 16:11:55 -0000 @@ -352,7 +352,7 @@ function locale_form_path_admin_form_alt $form['language'] = array( '#type' => 'select', '#title' => t('Language'), - '#options' => array('' => t('All languages')) + locale_language_list('name'), + '#options' => array(LANGUAGE_NONE => t('All languages')) + locale_language_list('name'), '#default_value' => $form['language']['#value'], '#weight' => -10, '#description' => t('A path alias set for a specific language will always be used when displaying this page in that language, and takes precedence over path aliases set for All languages.'), Index: modules/path/path.api.php =================================================================== RCS file: /cvs/drupal/drupal/modules/path/path.api.php,v retrieving revision 1.1 diff -u -p -r1.1 path.api.php --- modules/path/path.api.php 17 Oct 2009 00:52:36 -0000 1.1 +++ modules/path/path.api.php 13 Jan 2010 16:11:55 -0000 @@ -11,6 +11,14 @@ * @{ */ +/** + * Perform alterations to an URL alias before it is saved. + * + * @param $path + * The path array. + */ +function hook_path_alter(&$path) { +} /** * The path has been inserted.