summaryrefslogtreecommitdiff
path: root/includes/common.inc
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2007-11-29 14:42:31 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2007-11-29 14:42:31 +0000
commit5395f208d38df7091efb4d7f827d0b13d3dffc09 (patch)
tree5ca7567c45b9c2867f9098e6a93642319e9407eb /includes/common.inc
parenta35fb53e7209614421c6fce51b6f468d13b99312 (diff)
downloadbrdo-5395f208d38df7091efb4d7f827d0b13d3dffc09.tar.gz
brdo-5395f208d38df7091efb4d7f827d0b13d3dffc09.tar.bz2
#194743 by myself, reported and tested by Murz: the base URL was not properly modified for outgoing links to different language domains and path aliases were not handled in the target language
Diffstat (limited to 'includes/common.inc')
-rw-r--r--includes/common.inc8
1 files changed, 6 insertions, 2 deletions
diff --git a/includes/common.inc b/includes/common.inc
index b101ddc56..6455bdb71 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -1285,7 +1285,11 @@ function url($path = NULL, $options = array()) {
$clean_url = (bool)variable_get('clean_url', '0');
}
- $base = $options['absolute'] ? $base_url .'/' : base_path();
+ if (!isset($options['base_url'])) {
+ // The base_url might be rewritten from the language rewrite in domain mode.
+ $options['base_url'] = $base_url;
+ }
+ $base = $options['absolute'] ? $options['base_url'] .'/' : base_path();
// Preserve the original path before aliasing.
$original_path = $path;
@@ -1293,7 +1297,7 @@ function url($path = NULL, $options = array()) {
// The special path '<front>' links to the default front page.
if (!empty($path) && $path != '<front>') {
if (!$options['alias']) {
- $path = drupal_get_path_alias($path);
+ $path = drupal_get_path_alias($path, isset($options['langcode']) ? $options['langcode'] : '');
}
if (function_exists('custom_url_rewrite_outbound')) {
// Modules may alter outbound links by reference.