Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
S
simple_sitemap
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
3
Merge Requests
3
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
simple_sitemap
Commits
e2f5e050
Commit
e2f5e050
authored
Feb 29, 2016
by
Pawel G
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changing CacheableResponse back to Response because of caching problems.
parent
cb9c6cc0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
src/Batch.php
src/Batch.php
+3
-6
src/Controller/SimplesitemapController.php
src/Controller/SimplesitemapController.php
+3
-2
No files found.
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
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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