Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
simple_sitemap
Commits
3daf77ab
Commit
3daf77ab
authored
Jun 22, 2016
by
Pawel G
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up a few classes
parent
a3228b48
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
8 deletions
+3
-8
simple_sitemap.module
simple_sitemap.module
+1
-1
src/Batch.php
src/Batch.php
+1
-2
src/Simplesitemap.php
src/Simplesitemap.php
+0
-4
src/SitemapGenerator.php
src/SitemapGenerator.php
+1
-1
No files found.
simple_sitemap.module
View file @
3daf77ab
...
...
@@ -38,7 +38,7 @@ function simple_sitemap_form_alter(&$form, $form_state, $form_id) {
$form
[
'#attached'
][
'library'
][]
=
'simple_sitemap/fieldsetSummaries'
;
}
$f
->
displayEntitySettings
(
$form
[
'simple_sitemap'
]);
$f
->
displayRegenerateNow
(
$form
[
'simple_sitemap'
]);
$f
->
displayRegenerateNow
(
$form
[
'simple_sitemap'
]);
// todo: do not show setting when creating new bundle
// Add submission handler.
if
(
isset
(
$form
[
'actions'
][
'submit'
][
'#submit'
]))
{
...
...
src/Batch.php
View file @
3daf77ab
...
...
@@ -238,8 +238,7 @@ class Batch {
self
::
registerError
(
self
::
PATH_DOES_NOT_EXIST_OR_NO_ACCESS
,
[
'@faulty_path'
=>
$custom_path
[
'path'
]],
'warning'
);
continue
;
}
$options
=
[
'absolute'
=>
TRUE
,
'language'
=>
$languages
[
Simplesitemap
::
getDefaultLangId
()]];
$url_object
=
Url
::
fromUserInput
(
$custom_path
[
'path'
],
$options
);
$url_object
=
Url
::
fromUserInput
(
$custom_path
[
'path'
],
[
'absolute'
=>
TRUE
]);
if
(
!
$url_object
->
access
(
$anon_user
))
continue
;
...
...
src/Simplesitemap.php
View file @
3daf77ab
...
...
@@ -362,10 +362,6 @@ class Simplesitemap {
return
FALSE
;
}
public
static
function
getDefaultLangId
()
{
return
\
Drupal
::
languageManager
()
->
getDefaultLanguage
()
->
getId
();
}
/**
* Returns objects of entity types that can be indexed by the sitemap.
*
...
...
src/SitemapGenerator.php
View file @
3daf77ab
...
...
@@ -157,7 +157,7 @@ class SitemapGenerator {
* @return string sitemap chunk
*/
private
static
function
generateSitemapChunk
(
$links
)
{
$default_language_id
=
Simplesitemap
::
getDefaultLangId
();
$default_language_id
=
\
Drupal
::
languageManager
()
->
getDefaultLang
uage
()
->
get
Id
();
$writer
=
new
XMLWriter
();
$writer
->
openMemory
();
...
...
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