Commit d2d6bc80 authored by Darren Oh's avatar Darren Oh
Browse files

#196393 Made default paths in gss.xsl work for most installations.

parent 64d2806d
......@@ -12,8 +12,8 @@
<html>
<head>
<title>Site map file</title>
<link href="gss.css" type="text/css" rel="stylesheet"/>
<script src="gss.js"></script>
<link href="/sites/all/modules/xmlsitemap/gss/gss.css" type="text/css" rel="stylesheet"/>
<script src="/sites/all/modules/xmlsitemap/gss/gss.js"></script>
</head>
<!-- Store in $fileType if we are in a sitemap or in a siteindex -->
......
......@@ -40,11 +40,11 @@ function xmlsitemap_enable() {
$css_start = strpos($xsl, '<link href="') + strlen('<link href="');
$css_length = strpos($xsl, '" type="text/css" rel="stylesheet"/>') - $css_start;
$xsl = substr_replace($xsl, "$base_path". drupal_get_path('module', 'xmlsitemap') .'/gss/gss.css', $css_start, $css_length);
$xsl = substr_replace($xsl, $base_path . drupal_get_path('module', 'xmlsitemap') .'/gss/gss.css', $css_start, $css_length);
$js_start = strpos($xsl, '<script src="') + strlen('<script src="');
$js_length = strpos($xsl, '"></script>') - $js_start;
$xsl = substr_replace($xsl, "$base_path". drupal_get_path('module', 'xmlsitemap') .'/gss/gss.js', $js_start, $js_length);
$xsl = substr_replace($xsl, $base_path . drupal_get_path('module', 'xmlsitemap') .'/gss/gss.js', $js_start, $js_length);
if (file_check_directory(($path = file_directory_path() .'/xmlsitemap'), TRUE)) {
file_save_data($xsl, "$path/gss.xsl", FILE_EXISTS_REPLACE);
......
Markdown is supported
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