// Unzip all files and/or database sql files. echo "<script>bb_action( 'filesRestoreSuccess' );</script>"; } } } else { $results = true; pb_backupbuddy::status('details', 'Completely skipping ALL file extraction based on skipUnzip advanced setting.'); echo "<script>bb_action( 'filesRestoreSkipped' );</script>"; } // On unzip success OR skipping unzip. pb_backupbuddy::status('details', 'Finishing step 2.'); if (false === $restore->_state['restoreFiles'] || true === $results) { $restore->renameHtaccessTemp(); // Rename .htaccess to .htaccess.bb_temp until end of migration. //sleep(1); // Give time for file rename? $restore->determineDatabaseFiles(); pb_backupbuddy::status('details', 'About to load Step 3.'); ?> <script> setTimeout( function(){ pageTitle( 'Step 3: Database Settings' ); bb_showStep( 'databaseSettings', <?php echo json_encode($restore->_state); ?> ); }, 2000); </script> <?php } // Load footer. pb_backupbuddy::load_view('_iframe_footer');
$restoreData['zipMethodStrategy'] = 'all'; } else { $restoreData['zipMethodStrategy'] = pb_backupbuddy::$options['zip_method_strategy']; } // Instantiate rollback. require_once pb_backupbuddy::plugin_path() . '/classes/restore.php'; $rollback = new backupbuddy_restore('rollback', $restoreData); $status = $rollback->restoreFiles(); if (false === $status) { $errors = $rollback->getErrors(); if (count($errors) > 0) { pb_backupbuddy::alert('Errors were encountered: ' . implode(', ', $errors) . ' If seeking support please click to Show Advanced Details above and provide a copy of the log.'); } return; } $status = $rollback->determineDatabaseFiles(); if (false === $status) { $errors = $rollback->getErrors(); if (count($errors) > 0) { pb_backupbuddy::alert('Errors were encountered: ' . implode(', ', $errors) . ' If seeking support please click to Show Advanced Details above and provide a copy of the log.'); } return; } $restoreData = $rollback->getState(); ?> <script> pb_status_undourl( "<?php echo $restoreData['undoURL']; ?>