Skip to content

Commit 3efdf0a

Browse files
Copilotswissspidy
andcommitted
Fix progress bar sprintf format strings
Fixed sprintf format strings for make_progress_bar() calls. Changed from 'Progress' (which ignored table/col parameters) to 'Processing table.column' for regular processing and 'Processing table' for exports. This ensures the progress bar displays with meaningful labels. Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
1 parent 3e0e5a0 commit 3efdf0a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Search_Replace_Command.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ private function php_export_table( $table, $old, $new ) {
566566
$total_rows = $wpdb->get_var( "SELECT COUNT(*) FROM {$table_sql}" );
567567
if ( $total_rows > 0 ) {
568568
WP_CLI::log( sprintf( 'Exporting %s (%d rows)', $table, $total_rows ) );
569-
$progress = \WP_CLI\Utils\make_progress_bar( sprintf( 'Progress' ), $total_rows );
569+
$progress = \WP_CLI\Utils\make_progress_bar( sprintf( 'Processing %s', $table ), $total_rows );
570570
}
571571
}
572572

@@ -679,7 +679,7 @@ static function ( $key ) {
679679
$total_rows = $wpdb->get_var( "SELECT COUNT(*) FROM {$table_sql} {$where_key}" );
680680
if ( $total_rows > 0 ) {
681681
WP_CLI::log( sprintf( 'Updating %s.%s (%d rows)', $table, $col, $total_rows ) );
682-
$progress = \WP_CLI\Utils\make_progress_bar( sprintf( 'Progress', $table, $col ), $total_rows );
682+
$progress = \WP_CLI\Utils\make_progress_bar( sprintf( 'Processing %s.%s', $table, $col ), $total_rows );
683683
}
684684
}
685685

0 commit comments

Comments
 (0)