Commit 3ea84574 authored by andrei.dincu's avatar andrei.dincu
Browse files

Issue #2249723 by andrei.dincu: Few changes in method controller to output xml sitemap

parent e5436615
......@@ -24,7 +24,7 @@ class XmlSitemapController extends ControllerBase {
$file = xmlsitemap_sitemap_get_file($sitemap, $chunk);
// Provide debugging information if enabled.
if (\Drupal::config('xmlsitemap.settings')->get('developer_mode') /*&& isset($_GET['debug'])*/) {
if (\Drupal::config('xmlsitemap.settings')->get('developer_mode')) {
$output = array();
$context = xmlsitemap_get_current_context();
$output[] = "Current context: " . print_r($context, TRUE);
......@@ -34,9 +34,7 @@ class XmlSitemapController extends ControllerBase {
$output[] = "Cache file exists: " . (file_exists($file) ? 'Yes' : 'No');
return new Response(implode('<br />', $output));
}
xmlsitemap_output_file();
return new Response();
return new Response(xmlsitemap_output_file($file));
xmlsitemap_output_file($file);
}
public function renderSitemapXsl() {
......
......@@ -107,7 +107,7 @@ function xmlsitemap_file_transfer($uri, $headers) {
foreach ($headers as $name => $value) {
drupal_add_http_header($name, $value);
}
//drupal_send_headers();
drupal_send_headers();
// Attempt to increase time to transfer file.
drupal_set_time_limit(240);
......
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