diff --git a/class/class-mainwp-backup.php b/class/class-mainwp-backup.php index 9a076c4..20e21d2 100644 --- a/class/class-mainwp-backup.php +++ b/class/class-mainwp-backup.php @@ -69,7 +69,7 @@ class MainWP_Backup { } if ( ( false !== $fileSuffix ) && ! empty( $fileSuffix ) ) { - //Append already contains extension! + // Append already contains extension! $file = $fileSuffix . ( true === $append ? '' : $ext ); } else { $file = 'backup-' . $filePrefix . $timestamp . $ext; @@ -157,7 +157,7 @@ class MainWP_Backup { } public function _zipFilePcl( $files, $archive ) { - //Zip this backup folder.. + // Zip this backup folder.. require_once ABSPATH . 'wp-admin/includes/class-pclzip.php'; $this->zip = new PclZip( $archive ); @@ -469,16 +469,16 @@ class MainWP_Backup { } public function createZipPclFullBackup2( $filepath, $excludes, $addConfig, $includeCoreFiles, $excludezip, $excludenonwp ) { - //Create backup folder + // Create backup folder $backupFolder = dirname( $filepath ) . DIRECTORY_SEPARATOR . 'backup' . DIRECTORY_SEPARATOR; // @codingStandardsIgnoreStart @mkdir( $backupFolder ); // @codingStandardsIgnoreEnd - //Create DB backup + // Create DB backup $db_files = $this->createBackupDB( $backupFolder . 'dbBackup' ); - //Copy installation to backup folder + // Copy installation to backup folder $nodes = glob( ABSPATH . '*' ); if ( ! $includeCoreFiles ) { $coreFiles = array( @@ -530,7 +530,7 @@ class MainWP_Backup { // @codingStandardsIgnoreEnd unset( $nodes ); - //Zip this backup folder.. + // Zip this backup folder.. require_once ABSPATH . 'wp-admin/includes/class-pclzip.php'; $this->zip = new PclZip( $filepath ); $this->zip->create( $backupFolder, PCLZIP_OPT_REMOVE_PATH, $backupFolder ); @@ -546,7 +546,7 @@ class MainWP_Backup { $this->addFileFromStringToPCLZip( 'clone/config.txt', $string, $filepath ); } - //Remove backup folder + // Remove backup folder MainWP_Helper::delete_dir( $backupFolder ); return true; @@ -660,7 +660,7 @@ class MainWP_Backup { $this->zipArchiveSizeCount += filesize( $path ); $this->gcCnt ++; - //5 mb limit! + // 5 mb limit! if ( ! $this->loadFilesBeforeZip || ( filesize( $path ) > 5 * 1024 * 1024 ) ) { $this->zipArchiveFileCount ++; $added = $this->zip->addFile( $path, $zipEntryName ); @@ -686,7 +686,7 @@ class MainWP_Backup { $this->gcCnt = 0; } - //Over limits? + // Over limits? if ( ( ( $this->file_descriptors > 0 ) && ( $this->zipArchiveFileCount > $this->file_descriptors ) ) ) { // || $this->zipArchiveSizeCount >= (31457280 * 2)) $this->zip->close(); $this->zip = null; @@ -725,7 +725,7 @@ class MainWP_Backup { global $wpdb; $db_files = array(); - //Get all the tables + // Get all the tables $tables_db = $wpdb->get_results( 'SHOW TABLES FROM `' . DB_NAME . '`', ARRAY_N ); foreach ( $tables_db as $curr_table ) { if ( null !== $archiver ) { @@ -739,11 +739,11 @@ class MainWP_Backup { if ( file_exists( $currentfile ) ) { continue; } - $fh = fopen( $currentfile . '.tmp', 'w' ); //or error; + $fh = fopen( $currentfile . '.tmp', 'w' ); // or error; fwrite( $fh, "\n\n" . 'DROP TABLE IF EXISTS ' . $table . ';' ); - //todo fix this - //$table_create = $wpdb->get_row( $wpdb->prepare( 'SHOW CREATE TABLE %s', $table ), ARRAY_N ); + // todo fix this + // $table_create = $wpdb->get_row( $wpdb->prepare( 'SHOW CREATE TABLE %s', $table ), ARRAY_N ); $table_create = $wpdb->get_row( 'SHOW CREATE TABLE ' . $table, ARRAY_N ); fwrite( $fh, "\n" . $table_create[1] . ";\n\n" ); @@ -804,7 +804,7 @@ class MainWP_Backup { @unlink( $db_file ); } } else { - //todo: throw exception! + // todo: throw exception! } } diff --git a/class/class-mainwp-child-back-up-buddy.php b/class/class-mainwp-child-back-up-buddy.php index afa2d78..d4e12e4 100644 --- a/class/class-mainwp-child-back-up-buddy.php +++ b/class/class-mainwp-child-back-up-buddy.php @@ -29,7 +29,7 @@ class MainWP_Child_Back_Up_Buddy { public function __construct() { // To fix bug run dashboard on local machine - //if ( is_plugin_active( 'backupbuddy/backupbuddy.php' )) { + // if ( is_plugin_active( 'backupbuddy/backupbuddy.php' )) { if ( class_exists('pb_backupbuddy')) { $this->is_backupbuddy_installed = true; } @@ -822,7 +822,7 @@ class MainWP_Child_Back_Up_Buddy { $information = array(); $information['backup_list'] = $this->get_backup_list(); $information['recent_backup_list'] = $this->get_recent_backup_list(); - //$information['destinations_list'] = pb_backupbuddy_destinations::get_destinations_list(); + // $information['destinations_list'] = pb_backupbuddy_destinations::get_destinations_list(); $backup_directory = backupbuddy_core::getBackupDirectory(); $backup_directory = str_replace( '\\', '/', $backup_directory ); $backup_directory = rtrim( $backup_directory, '/\\' ) . '/'; @@ -847,7 +847,7 @@ class MainWP_Child_Back_Up_Buddy { $comment = backupbuddy_core::normalize_comment_data( $old_comment ); $comment['note'] = $note; - //$new_comment = base64_encode( serialize( $comment ) ); + // $new_comment = base64_encode( serialize( $comment ) ); $comment_result = pb_backupbuddy::$classes['zipbuddy']->set_comment( $backup_file, $comment ); @@ -1149,16 +1149,16 @@ class MainWP_Child_Back_Up_Buddy { unset( $temp_dir ); $message = 'Extracting "' . $file . '" from archive "' . $archive_file . '" into temporary file "' . $destination . '". '; - //echo ''; + // echo ' -->'; $error = 'Error #584984458. Unable to extract.'; pb_backupbuddy::status( 'error', $error ); return array( 'error' => $error ); @@ -1539,7 +1539,7 @@ class MainWP_Child_Back_Up_Buddy { Integrity Technical Details'; echo '