public/wordpress/wp-content/plugins/backupbuddy/_importbuddy/importbuddy/controllers/pages/homeBackupSelect.php
/* preflightScan()
 *
 * Checks for potential problems before getting started.
 * @return array of potential problems. Key is a unique slug to the issue, value is a descriptive text.
 */
preflightScan()
Checks for potential problems before getting started.
@return array of potential problems. Key is a unique slug to the issue, value is a descriptive text.
preflightScan () Checks for potential problems before getting started . @return array of potential problems . Key is a unique slug to the issue value is a descriptive text .
function preflightScan() {
	$issues = array();
	if ( file_exists( ABSPATH . 'wp-config.php' ) ) {
		$issues['wordpress_exists'] = 'WARNING: Existing WordPress installation found. It is strongly recommended that existing WordPress files and database be removed prior to migrating or restoring to avoid conflicts. You should not install WordPress prior to migrating.';
	}
	if ( file_exists( ABSPATH . 'php.ini' ) ) {
		$issues['php_ini_exists'] = 'WARNING: Existing php.ini file found which configures custom PHP settings. If your backup also contains a php.ini file it may overwrite the current one, possibly resulting in changes in configuration or problems. Make a backup of your existing file if your are unsure.';
	}
	if ( file_exists( ABSPATH . '.user.ini' ) ) {
		$issues['php_ini_exists'] = 'WARNING: Existing .user.ini file found which configures custom PHP settings. If your backup also contains a .user.ini file it may overwrite the current one, possibly resulting in changes in configuration or problems. Make a backup of your existing file if your are unsure.';
	}
	if ( file_exists( ABSPATH . '.htaccess' ) ) {
		$issues['htaccess_exists'] = 'WARNING: Existing .htaccess file found. If your backup also contains a .htaccess file it may overwrite the current one, possibly resulting in changes in configuration or problems. Make a backup of your existing file if you are unsure.';
	}
	$backup_dirs = glob( ABSPATH . 'backup-*/wp-login.php' );
	if ( ! is_array( $backup_dirs ) ) {
		$backup_dirs = array();
	}
	if ( count( (array)$backup_dirs ) > 0 ) {
		$issues['manual_unzip_wrong_location'] = 'A manually unzipped backup may have been found in the following location(s). If you manually unzipped confirm the files were not unzipped into this subdirectory else they will need to be moved up out of the subdirectory into the same directory as importbuddy.php. Possible manually unzipped backups in a subdirectory: ' . implode( ', ', $backup_dirs );
	}
	return $issues;
}
function preflightScan ( ) { $ issues = array ( ) ; if ( file_exists ( ABSPATH . 'wp-config.php' ) ) { $ issues [ 'wordpress_exists' ] = 'WARNING: Existing WordPress installation found. It is strongly recommended that existing WordPress files and database be removed prior to migrating or restoring to avoid conflicts. You should not install WordPress prior to migrating.' ; } if ( file_exists ( ABSPATH . 'php.ini' ) ) { $ issues [ 'php_ini_exists' ] = 'WARNING: Existing php.ini file found which configures custom PHP settings. If your backup also contains a php.ini file it may overwrite the current one, possibly resulting in changes in configuration or problems. Make a backup of your existing file if your are unsure.' ; } if ( file_exists ( ABSPATH . '.user.ini' ) ) { $ issues [ 'php_ini_exists' ] = 'WARNING: Existing .user.ini file found which configures custom PHP settings. If your backup also contains a .user.ini file it may overwrite the current one, possibly resulting in changes in configuration or problems. Make a backup of your existing file if your are unsure.' ; } if ( file_exists ( ABSPATH . '.htaccess' ) ) { $ issues [ 'htaccess_exists' ] = 'WARNING: Existing .htaccess file found. If your backup also contains a .htaccess file it may overwrite the current one, possibly resulting in changes in configuration or problems. Make a backup of your existing file if you are unsure.' ; } $ backup_dirs = glob ( ABSPATH . 'backup-*/wp-login.php' ) ; if ( ! is_array ( $ backup_dirs ) ) { $ backup_dirs = array ( ) ; } if ( count ( ( array ) $ backup_dirs ) > 0 ) { $ issues [ 'manual_unzip_wrong_location' ] = 'A manually unzipped backup may have been found in the following location(s). If you manually unzipped confirm the files were not unzipped into this subdirectory else they will need to be moved up out of the subdirectory into the same directory as importbuddy.php. Possible manually unzipped backups in a subdirectory: ' . implode ( ', ' , $ backup_dirs ) ; } return $ issues ; }
preflightScan()
 Checks for potential problems before getting started.
preflightScan () Checks for potential problems before getting started .
/* TODO: Move to post flight scan.
	if ( ( file_exists( ABSPATH . 'index.htm' ) === true ) || ( file_exists( ABSPATH . 'index.html' ) === true ) ) {
		$issues['index_exists'] = 'An index.htm(l) file exists in this site path. Depending on your server setup it may take precedence in loading instead of WordPress. If after restore your site loads an unexpected or blank page, try renaming or deleting the index.htm(l) file(s) in the site root, `' . ABSPATH . '`.';
	}
	*/ // Look for directories named after a backup file that contain WordPress. -- improperly unzipped in the wrong location.