summaryrefslogtreecommitdiff
path: root/modules/path/path.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/path/path.module')
-rw-r--r--modules/path/path.module7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/path/path.module b/modules/path/path.module
index b00f7b998..5baa45a82 100644
--- a/modules/path/path.module
+++ b/modules/path/path.module
@@ -184,7 +184,7 @@ function path_set_alias($path = NULL, $alias = NULL, $pid = NULL, $language = ''
/**
* Return a form for editing or creating an individual URL alias.
*/
-function path_form($edit = array('src' => '', 'dst' => '', 'pid' => NULL)) {
+function path_form($edit = array('src' => '', 'dst' => '', 'language' => '', 'pid' => NULL)) {
$form['#submit']['path_form_submit'] = array();
$form['#validate']['path_form_validate'] = array();
$form['#theme'] = 'path_form';
@@ -208,6 +208,11 @@ function path_form($edit = array('src' => '', 'dst' => '', 'pid' => NULL)) {
'#description' => t('Specify an alternative path by which this data can be accessed. For example, type "about" when writing an about page. Use a relative path and don\'t add a trailing slash or the URL alias won\'t work.'),
'#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q=')
);
+ // This will be a hidden value unless locale module is enabled
+ $form['language'] = array(
+ '#type' => 'value',
+ '#value' => $edit['language']
+ );
if ($edit['pid']) {
$form['pid'] = array('#type' => 'hidden', '#value' => $edit['pid']);
$form['submit'] = array('#type' => 'submit', '#value' => t('Update alias'));