Initial commit

This commit is contained in:
2020-04-07 13:03:04 +00:00
committed by Gitium
commit 00f842d9bf
1673 changed files with 471161 additions and 0 deletions

View File

@ -0,0 +1,2 @@
<?php
class ProgressLog { public static function l( $portion, $total ) { if ( $total === 0 ) { return; } $target_settings = array( 'wpenv', ); $wp_uploads_path = ''; if ( defined( 'WP_CLI' ) ) { require_once dirname( __FILE__ ) . '/DBSettings.php'; $settings = WPSHO_DBSettings::get( $target_settings ); $wp_uploads_path = $settings['wp_uploads_path']; } else { $wp_uploads_path = $_POST['wp_uploads_path']; } $log_file_path = $wp_uploads_path . '/WP-STATIC-PROGRESS.txt'; $progress_percent = floor( $portion / $total * 100 ); file_put_contents( $log_file_path, $progress_percent . PHP_EOL, LOCK_EX ); chmod( $log_file_path, 0664 ); } }