Beispiel #1
0
<?php

// Incoming vars: $backupFile, $step
if (!current_user_can(pb_backupbuddy::$options['role_access'])) {
    die('Error #473623. Access Denied.');
}
//pb_backupbuddy::verify_nonce();
pb_backupbuddy::load_script('jquery');
$restoreData = unserialize(base64_decode(pb_backupbuddy::_POST('restoreData')));
require_once pb_backupbuddy::plugin_path() . '/classes/rollback.php';
$rollback = new backupbuddy_rollback($restoreData);
$status = $rollback->swapDatabases();
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();
?>


<h3>Test your site then select <i>Accept</i> to lock in changes or <i>Cancel</i> to undo.</h3>
<a href="<?php 
echo site_url();
?>
" target="_new"><b>Click here to test your site</b></a> before proceeding.
<br><br>
If your site functions as expected you may proceed to making these changes permanent by selecting the button below to
accept the changes. If anything appears wrong or you have not made a backup of your original site you should select to cancel
Beispiel #2
0
if (!current_user_can(pb_backupbuddy::$options['role_access'])) {
    die('Error #473623. Access Denied.');
}
//pb_backupbuddy::verify_nonce();
pb_backupbuddy::load_script('jquery');
$restoreData = unserialize(base64_decode(pb_backupbuddy::_POST('restoreData')));
// Set any advanced options into the current state.
if ('1' != pb_backupbuddy::_POST('autoAdvance')) {
    $restoreData['autoAdvance'] = false;
}
if ('1' == pb_backupbuddy::_POST('forceMysqlCompatibility')) {
    $restoreData['forceMysqlMethods'] = array('php');
}
// Instantiate rollback.
require_once pb_backupbuddy::plugin_path() . '/classes/rollback.php';
$rollback = new backupbuddy_rollback($restoreData);
$status = $rollback->extractDatabase();
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'];
Beispiel #3
0
<?php

// Incoming vars: $backupFile, $step
if (!current_user_can(pb_backupbuddy::$options['role_access'])) {
    die('Error #473623. Access Denied.');
}
pb_backupbuddy::load_script('jquery');
require_once pb_backupbuddy::plugin_path() . '/classes/rollback.php';
$rollback = new backupbuddy_rollback();
$status = $rollback->start(backupbuddy_core::getBackupDirectory() . $backupFile);
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();
?>


<?php 
_e("This will roll back this site's database to the state contained within the selected backup file. Verify the backup details below to make sure this is the correct backup to roll back to and then follow the instructions on screen to roll back. This typically only takes a few minutes and you will be given the opportunity to test the changes and undo them before making them permanent. Tip: Create a Database or Full Backup before proceeding.", 'it-l10n-backupbuddy');
?>
<br><br>


<?php 
if (isset($restoreData['dat']['wordpress_version'])) {
    $wp_version = $restoreData['dat']['wordpress_version'];
} else {
Beispiel #4
0
<?php

// Incoming vars: $backupFile, $step
if (!current_user_can(pb_backupbuddy::$options['role_access'])) {
    die('Error #473623. Access Denied.');
}
//pb_backupbuddy::verify_nonce();
echo '<h3 style="margin-top: 0;">' . __('Rollback Complete', 'it-l10n-backupbuddy') . '</h3>';
$restoreData = unserialize(base64_decode(pb_backupbuddy::_POST('restoreData')));
require_once pb_backupbuddy::plugin_path() . '/classes/rollback.php';
$rollback = new backupbuddy_rollback($restoreData);
$status = $rollback->finalize();
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;
}
?>


<b>Thank you for choosing BackupBuddy!</b>


<script>
	pb_status_undourl( '' ); // Hide box.
</script>