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
600a7db0
Commit
600a7db0
authored
Mar 11, 2016
by
Pawel G
Browse files
Batch class: Fixing method name from batchProcessed to pathProcessed.
parent
ab18db04
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Batch.php
View file @
600a7db0
...
...
@@ -126,7 +126,7 @@ class Batch {
self
::
InitializeBatch
(
$query
->
countQuery
()
->
execute
()
->
fetchField
(),
$context
);
}
// Getting id field name from plugin info
, if not defined assuming the name of the first field in the query to be the entity id field name
.
// Getting id field name from plugin info.
$fields
=
$query
->
getFields
();
if
(
isset
(
$info
[
'field_info'
][
'entity_id'
])
&&
isset
(
$fields
[
$info
[
'field_info'
][
'entity_id'
]]))
{
$id_field
=
$info
[
'field_info'
][
'entity_id'
];
...
...
@@ -194,7 +194,7 @@ class Batch {
// Do not include path if it already exists.
$path
=
$url_object
->
getInternalPath
();
if
(
$batch_info
[
'remove_duplicates'
]
&&
self
::
b
at
c
hProcessed
(
$path
,
$context
[
'results'
][
'processed_paths'
]))
if
(
$batch_info
[
'remove_duplicates'
]
&&
self
::
p
athProcessed
(
$path
,
$context
[
'results'
][
'processed_paths'
]))
continue
;
$urls
=
array
();
...
...
@@ -254,7 +254,7 @@ class Batch {
continue
;
$path
=
$url_object
->
getInternalPath
();
if
(
$batch_info
[
'remove_duplicates'
]
&&
self
::
b
at
c
hProcessed
(
$path
,
$context
[
'results'
][
'processed_paths'
]))
if
(
$batch_info
[
'remove_duplicates'
]
&&
self
::
p
athProcessed
(
$path
,
$context
[
'results'
][
'processed_paths'
]))
continue
;
$urls
=
array
();
...
...
@@ -279,7 +279,7 @@ class Batch {
self
::
processSegment
(
$context
,
$batch_info
);
}
private
static
function
b
at
c
hProcessed
(
$needle
,
&
$path_pool
)
{
private
static
function
p
athProcessed
(
$needle
,
&
$path_pool
)
{
if
(
in_array
(
$needle
,
$path_pool
))
{
return
TRUE
;
}
...
...
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