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
xmlsitemap
Commits
52db265b
Commit
52db265b
authored
May 07, 2020
by
neclimdul
Committed by
pifagor
May 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#3117561
by phoang, piyuesh23, neclimdul, ilgnerfagundes: Update the path_alias table
parent
534177b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/XmlSitemapGenerator.php
src/XmlSitemapGenerator.php
+4
-4
No files found.
src/XmlSitemapGenerator.php
View file @
52db265b
...
...
@@ -160,8 +160,8 @@ class XmlSitemapGenerator implements XmlSitemapGeneratorInterface {
* {@inheritdoc}
*/
public
function
getPathAlias
(
$path
,
$language
)
{
$query
=
$this
->
connection
->
select
(
'
url
_alias'
,
'u'
);
$query
->
fields
(
'u'
,
[
'
source
'
,
'alias'
]);
$query
=
$this
->
connection
->
select
(
'
path
_alias'
,
'u'
);
$query
->
fields
(
'u'
,
[
'
path
'
,
'alias'
]);
if
(
!
isset
(
static
::
$aliases
))
{
$query
->
condition
(
'langcode'
,
LanguageInterface
::
LANGCODE_NOT_SPECIFIED
,
'='
);
static
::
$aliases
[
LanguageInterface
::
LANGCODE_NOT_SPECIFIED
]
=
$query
->
execute
()
->
fetchAllKeyed
();
...
...
@@ -169,7 +169,7 @@ class XmlSitemapGenerator implements XmlSitemapGeneratorInterface {
if
(
$language
!==
LanguageInterface
::
LANGCODE_NOT_SPECIFIED
&&
static
::
$lastLanguage
!=
$language
)
{
unset
(
static
::
$aliases
[
static
::
$lastLanguage
]);
$query
->
condition
(
'langcode'
,
$language
,
'='
);
$query
->
orderBy
(
'
p
id'
);
$query
->
orderBy
(
'id'
);
static
::
$aliases
[
$language
]
=
$query
->
execute
()
->
fetchAllKeyed
();
static
::
$lastLanguage
=
$language
;
}
...
...
@@ -224,7 +224,7 @@ class XmlSitemapGenerator implements XmlSitemapGeneratorInterface {
// Add memory for storing the url aliases.
if
(
$this
->
config
->
get
(
'prefetch_aliases'
))
{
$aliases
=
$this
->
connection
->
query
(
"SELECT COUNT(
p
id) FROM
{
url
_alias
}
"
)
->
fetchField
();
$aliases
=
$this
->
connection
->
query
(
"SELECT COUNT(id) FROM
{
path
_alias
}
"
)
->
fetchField
();
$optimal_limit
+=
$aliases
*
250
;
}
}
...
...
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