Skip to content

Commit fb9f11d

Browse files
committed
Different progress calculation.
When the progress count hit 10/10, the progress bar would show 100%, but it was still processing. This way it’s clear that there is still work to do.
1 parent f09038f commit fb9f11d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

wpengine-phpcompat.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,7 @@ function check_status() {
130130
// If the scan is still running.
131131
if ( $scan_status ) {
132132
$to_encode['results'] = '0';
133-
// Adding one because we don't remove an item until it's done processing.
134-
$to_encode['progress'] = 100 - ( ( ( $count_jobs->publish + 1 ) / $total_jobs ) * 100 );
133+
$to_encode['progress'] = ( ( $total_jobs - $count_jobs->publish ) / $total_jobs) * 100;
135134
} else {
136135
// Else return the results and clean up!
137136
$scan_results = get_option( 'wpephpcompat.scan_results' );

0 commit comments

Comments
 (0)