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
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
[
'results'
])
][
'path'
]))
{
$last_path
=
HTML
::
escape
(
$context
[
'results'
][
key
(
$context
[
'results'
])
][
'path'
]);
if
(
!
empty
(
$context
[
'results'
][
$context
[
'sandbox'
][
'progress'
]
][
'path'
]))
{
$last_path
=
HTML
::
escape
(
$context
[
'results'
][
$context
[
'sandbox'
][
'progress'
]
][
'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