Commit c25544c7 authored by Philippe Mouchel's avatar Philippe Mouchel
Browse files

Merge branch 'base_url' into '7.x'

Base url

Dans un contexte multisite, le chemin de base est dupliqué:

$base_url =**sous-site**

$node_url = **sous-site**/titre-du-noeud

Tandis que:

$base_root =

See merge request !1
parents 3021a0b2 049ce7a6
......@@ -67,13 +67,13 @@ function _sharer_toolbar_get_ordered_available_sharers() {
* Replace tokens with correct value in pattern URL
function _sharer_toolbar_generate_sharer_url(&$sharer_url, $variables) {
global $base_url;
global $base_root;
// URL replacement
$node_url = url('node/' . $variables['nid'], array(
'language' => (object) array('language' => $variables['language']),
$sharer_url = str_replace('[:shared_url:]', $base_url . $node_url, $sharer_url);
$sharer_url = str_replace('[:shared_url:]', $base_root . $node_url, $sharer_url);
// Title replacement
$sharer_url = str_replace('[:shared_title:]', $variables['title'], $sharer_url);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment