Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
simple_sitemap
Commits
e2f5e050
Commit
e2f5e050
authored
Feb 29, 2016
by
Pawel G
Browse files
Changing CacheableResponse back to Response because of caching problems.
parent
cb9c6cc0
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Batch.php
View file @
e2f5e050
...
...
@@ -52,7 +52,9 @@ class Batch {
case
'form'
:
break
;
case
'drush'
:
case
'cron'
:
print
$this
->
batch
[
'init_message'
]
.
"
\r\n
"
;
// drush_log($this->batch['init_message']);
$this
->
batch
=&
batch_get
();
$this
->
batch
[
'progressive'
]
=
FALSE
;
if
(
function_exists
(
'drush_backend_batch_process'
))
...
...
@@ -60,11 +62,6 @@ class Batch {
else
batch_process
();
break
;
case
'cron'
:
$this
->
batch
=&
batch_get
();
$this
->
batch
[
'progressive'
]
=
FALSE
;
batch_process
();
break
;
}
}
...
...
@@ -120,7 +117,7 @@ class Batch {
*
* @see https://api.drupal.org/api/drupal/core!includes!form.inc/group/batch/8
*/
static
function
generate_bundle_urls
(
$query
,
$info
,
$batch_info
,
&
$context
)
{
public
static
function
generate_bundle_urls
(
$query
,
$info
,
$batch_info
,
&
$context
)
{
$languages
=
\
Drupal
::
languageManager
()
->
getLanguages
();
$default_language_id
=
Simplesitemap
::
get_default_lang_id
();
...
...
src/Controller/SimplesitemapController.php
View file @
e2f5e050
...
...
@@ -6,7 +6,7 @@
namespace
Drupal\simple_sitemap\Controller
;
use
Drupal\Core\Cache\CacheableResponse
;
//
use Drupal\Core\Cache\CacheableResponse;
use
Symfony\Component\HttpFoundation\Response
;
use
Drupal\simple_sitemap
\
Simplesitemap
;
...
...
@@ -29,6 +29,7 @@ class SimplesitemapController {
$output
=
$sitemap
->
get_sitemap
(
$sitemap_id
);
// Display sitemap with correct xml header.
return
new
CacheableResponse
(
$output
,
Response
::
HTTP_OK
,
array
(
'content-type'
=>
'application/xml'
));
// return new CacheableResponse($output, Response::HTTP_OK, array('content-type' => 'application/xml'));
return
new
Response
(
$output
,
Response
::
HTTP_OK
,
array
(
'content-type'
=>
'application/xml'
));
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment