diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-04-25 21:28:00 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-04-25 21:28:00 +0000 |
commit | 9a142acc8dcbf690e146d0c146128d8cf8443b47 (patch) | |
tree | 6849f0d59e1b6e0b01fdf8140d60e3e3a4668f0e /modules/path | |
parent | 3e9d5f9d3cbfe0e191682273cd05ad3ec5a2fdd0 (diff) | |
download | brdo-9a142acc8dcbf690e146d0c146128d8cf8443b47.tar.gz brdo-9a142acc8dcbf690e146d0c146128d8cf8443b47.tar.bz2 |
- Patch #137376 by Gabor: add language support to nodes.
Diffstat (limited to 'modules/path')
-rw-r--r-- | modules/path/path.module | 7 |
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')); |