golden hour
/home/doctorbruno/public_html/pgmed.org/wp-content/plugins/backupbuddy/controllers/pages/rollback
⬆️ Go Up
Upload
File/Folder
Size
Actions
_step0.php
3.75 KB
Del
OK
_step1.php
2.62 KB
Del
OK
_step2.php
2.08 KB
Del
OK
_step3.php
2.03 KB
Del
OK
_step4.php
953 B
Del
OK
index.php
27 B
Del
OK
Edit: _step2.php
<?php // Incoming vars: $backupFile, $step if ( ! current_user_can( pb_backupbuddy::$options['role_access'] ) ) { die( 'Error #473623. Access Denied.' ); } pb_backupbuddy::verify_nonce(); $nextStep = 3; $restoreData = unserialize( base64_decode( pb_backupbuddy::_POST( 'restoreData' ) ) ); require_once( pb_backupbuddy::plugin_path() . '/classes/restore.php' ); $rollback = new backupbuddy_restore( 'rollback', $restoreData ); $status = $rollback->restoreDatabase(); 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; } elseif ( is_numeric( $status ) ) { // Incomplete, has more to import at a certain point. $nextStep = 2; // more to do on step 2. } elseif ( is_array( $status ) ) { // Finished an entire SQL file, pick back up on next SQL file defined in the state. $nextStep = 2; // more to do on step 2. } elseif ( true === $status ) { // Completely finished everything! // yay. } else { $error = 'Error #9483493: Unknown mysqlbuddy response `' . $status . '`.'; pb_backupbuddy::status( 'error', $error ); } $restoreData = $rollback->getState(); ?> <?php if ( true === $restoreData['autoAdvance'] ) { // Auto-advance if enabled. ?> <?php _e( 'Continuing to next step... It should run momentarily.', 'it-l10n-backupbuddy' ); ?> <br><br> <script> jQuery(document).ready(function() { jQuery( '#pb_backupbuddy_rollback_form' ).submit(); }); </script> <?php } ?> <form id="pb_backupbuddy_rollback_form" method="post" action="?action=pb_backupbuddy_backupbuddy&function=rollback&step=<?php echo $nextStep; ?>&archive=<?php echo basename( $restoreData['archive'] ); ?>"> <?php pb_backupbuddy::nonce(); ?> <input type="hidden" name="restoreData" value="<?php echo base64_encode( serialize( $restoreData ) ); ?>"> <input type="submit" name="submitForm" class="button button-primary" value="<?php echo __('Next Step') . ' »'; ?>" style="visibility: hidden;"> </form>
Save