public/wordpress/wp-content/plugins/backupbuddy/classes/restore.php
/* scrubIndexFiles()
	 *
	 * Deletes index.htm file if it appears to have the contents that ImportBuddy created it with.
	 * Non-importbuddy created index.htm files are left in place to be warned about later as the user may want it there.
	 *
	 */
scrubIndexFiles()
Deletes index.htm file if it appears to have the contents that ImportBuddy created it with.
Non-importbuddy created index.htm files are left in place to be warned about later as the user may want it there.
scrubIndexFiles () Deletes index . htm file if it appears to have the contents that ImportBuddy created it with . Non - importbuddy created index . htm files are left in place to be warned about later as the user may want it there .
function scrubIndexFiles() {
		$this->_before( __FUNCTION__ );
		$indexFiles = array( 'index.htm', 'index.html' );
		foreach( $indexFiles as $indexFile ) {
			if ( file_exists( ABSPATH . $indexFile ) ) {
				pb_backupbuddy::status( 'details', $indexFile . ' file exists. Checking to see if ImportBuddy generated it or it is empty.' );
				$index_contents = @file_get_contents( ABSPATH . $indexFile );
				if ( false === $index_contents ) { 
					pb_backupbuddy::status( 'error', $indexFile . ' file unreadable. You may need to manually delete it to view your site.' );
				} else { 
					$index_contents = trim( $index_contents );
					if ( ( $index_contents == '<html></html>' ) || ( '' == $index_contents ) ) { 
						$index_unlink = @unlink( ABSPATH . $indexFile );
						if ( true === $index_unlink ) {
							pb_backupbuddy::status( 'details', $indexFile . ' file successfully deleted.' );
						} else {
							pb_backupbuddy::status( 'error', 'Unable to delete ' . $indexFile . ' file.  This is likely due to permissions. You may need to manually delete it to view your site.' );
						}
					} else { 
						pb_backupbuddy::status( 'details', $indexFile . ' file not generated by ImportBuddy and not empty. Leaving as is. You may need to delete it to view your site.' );
					}
				}
			} else { 
				pb_backupbuddy::status( 'details', $indexFile . ' file not found. Skipping deletion.' );
			}
		}
		return true;
	}
function scrubIndexFiles ( ) { $ this -> _before ( __FUNCTION__ ) ; $ indexFiles = array ( 'index.htm' , 'index.html' ) ; foreach ( $ indexFiles as $ indexFile ) { if ( file_exists ( ABSPATH . $ indexFile ) ) { pb_backupbuddy :: status ( 'details' , $ indexFile . ' file exists. Checking to see if ImportBuddy generated it or it is empty.' ) ; $ index_contents = @ file_get_contents ( ABSPATH . $ indexFile ) ; if ( false === $ index_contents ) { pb_backupbuddy :: status ( 'error' , $ indexFile . ' file unreadable. You may need to manually delete it to view your site.' ) ; } else { $ index_contents = trim ( $ index_contents ) ; if ( ( $ index_contents == '<html></html>' ) || ( '' == $ index_contents ) ) { $ index_unlink = @ unlink ( ABSPATH . $ indexFile ) ; if ( true === $ index_unlink ) { pb_backupbuddy :: status ( 'details' , $ indexFile . ' file successfully deleted.' ) ; } else { pb_backupbuddy :: status ( 'error' , 'Unable to delete ' . $ indexFile . ' file.  This is likely due to permissions. You may need to manually delete it to view your site.' ) ; } } else { pb_backupbuddy :: status ( 'details' , $ indexFile . ' file not generated by ImportBuddy and not empty. Leaving as is. You may need to delete it to view your site.' ) ; } } } else { pb_backupbuddy :: status ( 'details' , $ indexFile . ' file not found. Skipping deletion.' ) ; } } return true ; }
scrubIndexFiles()
 Deletes index.htm file if it appears to have the contents that ImportBuddy created it with.
scrubIndexFiles () Deletes index . htm file if it appears to have the contents that ImportBuddy created it with .
// Cannot read. // Read file succeeded. // Our file. Delete it! // Not our file. Leave alone. We will warn about this later though. // No index.htm file.