Skip to content

Instantly share code, notes, and snippets.

@pvhee
Created June 16, 2014 08:36
Show Gist options
  • Select an option

  • Save pvhee/c7bb73818659b8c7ff0d to your computer and use it in GitHub Desktop.

Select an option

Save pvhee/c7bb73818659b8c7ff0d to your computer and use it in GitHub Desktop.
sharethis.patch
diff --git a/sharethis.module b/sharethis.module
index b11b052..5b8b988 100644
--- a/sharethis.module
+++ b/sharethis.module
@@ -304,15 +304,15 @@ function sharethis_node_view($node, $view_mode, $langcode) {
}
// This will choose the path to use.
if ($is_path) {
- $path_module = $node->path;
+ $path_module = url($node->path['source']);
}
else {
- $path_module = "/node/" . $node->nid;
+ $path_module = "node/" . $node->nid;
}
// Pathauto integration !
if (module_exists('pathauto')) {
- $path_module = '/' . drupal_lookup_path('alias',"node/" . $node->nid);
+ $path_module = url("node/" . $node->nid);
}
global $base_url;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment