public/wordpress/wp-content/plugins/backupbuddy/_importbuddy/importbuddy/controllers/ajax/5.php
// Final functions to run after DB migration is done. In function since this is called both in standard and at end of deployment.
Final functions to run after DB migration is done. In function since this is called both in standard and at end of deployment.
Final functions to run after DB migration is done . In function since this is called both in standard and at end of deployment .
function finalActions( $restore ) {
	if ( TRUE !== $restore->_state['migrateHtaccess'] ) {
		pb_backupbuddy::status( 'details', 'Skipping migration of .htaccess file based on settings.' );
	} else {
		$restore->migrateHtaccess();
	}
	$restore->renameHtaccessTempBack();
	$restore->maintenanceOff( $onlyOurCreatedFile = true );
	$restore->scrubIndexFiles();
	$restore->_state['blogPublicStatus'] = $restore->getBlogPublicSetting();
	$wpconfig_result = $restore->migrateWpConfig();
	if ( $wpconfig_result !== true ) {
		pb_backupbuddy::alert( 'Error: Unable to update wp-config.php file. Verify write permissions for the wp-config.php file then refresh this page. You may manually update your wp-config.php file by changing it to the following:<textarea readonly="readonly" style="width: 80%;">' . $wpconfig_result . '</textarea>' );
	}
	$problems = $restore->troubleScan();
	if ( count( $problems ) > 0 ) {
		$restore->_state['potentialProblems'] = $problems;
		$trouble_text = '';
		foreach( $problems as $problem ) {
			$trouble_text .= '<li>' . $problem . '</li>';
		}
		$trouble_text = '<ul>' . $trouble_text . '</ul>';
		pb_backupbuddy::status( 'warning', 'One or more potential issues detected that may require your attention: ' . $trouble_text );
	}
	pb_backupbuddy::status( 'details', 'Finished final actions function.' );
}
function finalActions ( $ restore ) { if ( TRUE !== $ restore -> _state [ 'migrateHtaccess' ] ) { pb_backupbuddy :: status ( 'details' , 'Skipping migration of .htaccess file based on settings.' ) ; } else { $ restore -> migrateHtaccess ( ) ; } $ restore -> renameHtaccessTempBack ( ) ; $ restore -> maintenanceOff ( $ onlyOurCreatedFile = true ) ; $ restore -> scrubIndexFiles ( ) ; $ restore -> _state [ 'blogPublicStatus' ] = $ restore -> getBlogPublicSetting ( ) ; $ wpconfig_result = $ restore -> migrateWpConfig ( ) ; if ( $ wpconfig_result !== true ) { pb_backupbuddy :: alert ( 'Error: Unable to update wp-config.php file. Verify write permissions for the wp-config.php file then refresh this page. You may manually update your wp-config.php file by changing it to the following:<textarea readonly="readonly" style="width: 80%;">' . $ wpconfig_result . '</textarea>' ) ; } $ problems = $ restore -> troubleScan ( ) ; if ( count ( $ problems ) > 0 ) { $ restore -> _state [ 'potentialProblems' ] = $ problems ; $ trouble_text = '' ; foreach ( $ problems as $ problem ) { $ trouble_text .= '<li>' . $ problem . '</li>' ; } $ trouble_text = '<ul>' . $ trouble_text . '</ul>' ; pb_backupbuddy :: status ( 'warning' , 'One or more potential issues detected that may require your attention: ' . $ trouble_text ) ; } pb_backupbuddy :: status ( 'details' , 'Finished final actions function.' ) ; }
Final functions to run after DB migration is done.
Final functions to run after DB migration is done .
// Migrate htaccess. // Rename .htaccess.bb_temp back to .htaccess. // Remove any temporary .maintenance file created by ImportBuddy. // Remove any temporary index.htm file created by ImportBuddy. // TODO: Make these thnings be able to output stuff into the cleanupSettings.htm template. Add functions?
 // Update wpconfig if needed. // Scan for 'trouble' such as a remaining .maintenance file, index.htm, index.html, missing wp-config.php, missing .htaccess, etc etc.