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
0be51209
Commit
0be51209
authored
Feb 24, 2016
by
Pawel G
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improving shell output.
parent
55c67ba1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
src/Batch.php
src/Batch.php
+7
-9
No files found.
src/Batch.php
View file @
0be51209
...
...
@@ -46,9 +46,13 @@ class Batch {
case
'form'
:
break
;
case
'drush'
:
print
$this
->
batch
[
'init_message'
]
.
"
\r\n
"
;
$this
->
batch
=&
batch_get
();
$this
->
batch
[
'progressive'
]
=
FALSE
;
drush_backend_batch_process
();
if
(
function_exists
(
'drush_backend_batch_process'
))
drush_backend_batch_process
();
else
batch_process
();
break
;
case
'cron'
:
$this
->
batch
=&
batch_get
();
...
...
@@ -218,19 +222,13 @@ class Batch {
if
(
$context
[
'sandbox'
][
'progress'
]
!=
$context
[
'sandbox'
][
'max'
])
{
$context
[
'finished'
]
=
$context
[
'sandbox'
][
'progress'
]
/
$context
[
'sandbox'
][
'max'
];
// Adding processing message after finishing every part of the batch.
if
(
!
empty
(
$context
[
'results'
][
key
(
$context
[
'res
ult
s'
]
)
][
'path'
]))
{
$last_path
=
HTML
::
escape
(
$context
[
'results'
][
key
(
$context
[
'res
ult
s'
]
)
][
'path'
]);
if
(
!
empty
(
$context
[
'results'
][
$context
[
'
sandbox'
][
'prog
ress'
]][
'path'
]))
{
$last_path
=
HTML
::
escape
(
$context
[
'results'
][
$context
[
'
sandbox'
][
'prog
ress'
]][
'path'
]);
$context
[
'message'
]
=
t
(
"Processing path @current out of @max: @path"
,
array
(
'@current'
=>
$context
[
'sandbox'
][
'progress'
],
'@max'
=>
$context
[
'sandbox'
][
'max'
],
'@path'
=>
$last_path
,
));
// switch($batch_info['from']) { //todo: add shell output
// case 'drush':
// print $context['message'] . "\r\n";
// break;
// default:
// }
}
}
...
...
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