public/wordpress/wp-content/plugins/backupbuddy/classes/restore.php
/* finalizeRollback()
	 *
	 * ROLLBACK
	 * Finalize the rollback, deleting original tables & cleaning up temp files.
	 *
	 * @return true
	 */
finalizeRollback()
ROLLBACK
Finalize the rollback, deleting original tables & cleaning up temp files.

@return true
finalizeRollback () ROLLBACK Finalize the rollback deleting original tables & cleaning up temp files . @return true
public function finalizeRollback() {
		$this->_before( __FUNCTION__ );
		global $wpdb;
		$sql = "SELECT table_name FROM information_schema.tables WHERE table_name LIKE 'bbold-" . substr( $this->_state['serial'], 0, 4 ) . "\_%' AND table_schema = DATABASE()";
		$results = $wpdb->get_results( $sql, ARRAY_A );
		pb_backupbuddy::status( 'details', 'Found ' . count( $results ) . ' tables to drop.' );
		foreach( $results as $result ) {
			if ( false === $wpdb->query( "DROP TABLE `" . backupbuddy_core::dbEscape( $result['table_name'] ) . "`" ) ) {
				$this->_error( 'Unable to delete old table `' . $result['table_name'] . '`.' );
			}
		}
		pb_backupbuddy::status( 'details', 'Deleting undo file.' );
		@unlink( ABSPATH . $this->_state['undoFile'] );
		pb_backupbuddy::status( 'details', 'Deleting temp files.' );
		pb_backupbuddy::$filesystem->unlink_recursive( $this->_state['tempPath'] );
		pb_backupbuddy::status( 'details', 'Finished finalize function.' );
		return true;
	}
public function finalizeRollback ( ) { $ this -> _before ( __FUNCTION__ ) ; global $ wpdb ; $ sql = " SELECT table_name FROM information_schema.tables WHERE table_name LIKE 'bbold- " . substr ( $ this -> _state [ 'serial' ] , 0 , 4 ) . " \_%' AND table_schema = DATABASE() " ; $ results = $ wpdb -> get_results ( $ sql , ARRAY_A ) ; pb_backupbuddy :: status ( 'details' , 'Found ' . count ( $ results ) . ' tables to drop.' ) ; foreach ( $ results as $ result ) { if ( false === $ wpdb -> query ( " DROP TABLE ` " . backupbuddy_core :: dbEscape ( $ result [ 'table_name' ] ) . " ` " ) ) { $ this -> _error ( 'Unable to delete old table `' . $ result [ 'table_name' ] . '`.' ) ; } } pb_backupbuddy :: status ( 'details' , 'Deleting undo file.' ) ; @ unlink ( ABSPATH . $ this -> _state [ 'undoFile' ] ) ; pb_backupbuddy :: status ( 'details' , 'Deleting temp files.' ) ; pb_backupbuddy :: $ filesystem -> unlink_recursive ( $ this -> _state [ 'tempPath' ] ) ; pb_backupbuddy :: status ( 'details' , 'Finished finalize function.' ) ; return true ; }
finalizeRollback()
 ROLLBACK
 Finalize the rollback, deleting original tables & cleaning up temp files.
finalizeRollback () ROLLBACK Finalize the rollback deleting original tables & cleaning up temp files .
//echo $sql;