public/wordpress/wp-content/plugins/backupbuddy/destinations/live/live_continuous.php
/* _send_dbqueue()
	 *
	 * Does the actual sending of encoded SQL data to the Live servers for storage as a timestamped SQL file. Called via send_data() on shutdown hook.
	 *
	 */
_send_dbqueue()
Does the actual sending of encoded SQL data to the Live servers for storage as a timestamped SQL file. Called via send_data() on shutdown hook.
_send_dbqueue () Does the actual sending of encoded SQL data to the Live servers for storage as a timestamped SQL file . Called via send_data () on shutdown hook .
public static function _send_dbqueue() {
		$settings = pb_backupbuddy::$options['remote_destinations'][ backupbuddy_live::getLiveID() ];
		if ( ! isset( $settings['destination_version'] ) ) {
			$settings['destination_version'] = '2';
		}
		require_once( pb_backupbuddy::plugin_path() . '/destinations/stash' . $settings['destination_version'] . '/init.php' );
		$response = call_user_func_array( array( 'pb_backupbuddy_destination_stash' . $settings['destination_version'], 'stashAPI' ), array( $settings, 'live-put', array( 'files' => self::$_dbqueue_rendered ) ) );
		$errors = array();
		if ( ! is_array( $response ) ) { 
			$errors[] = 'Error #3279237: Unexpected server response. Check your BackupBuddy Stash Live login and try again. Detailed response: `' . print_r( $response, true ) .'`.';
		} else { 
			if ( isset( $response['error'] ) ) {
				$errors[] = $response['error']['message'];
			} else { 				if ( ! isset( $response['success'] ) || ( '1' != $response['success'] ) ) {
					$errors[] = 'Error #9327324: Something went wrong. Success was not reported. Detailed response: `' . print_r( $response, true ) .'`.';
				}
			}
		}
		self::$_queue_sent = true; 
		if ( count( $errors ) > 0 ) {
			pb_backupbuddy::status( 'error', 'Error sending live continuous data. Error(s): `' . implode( ', ', $errors ) . '`.' );
		} else {
			backupbuddy_live::update_db_live_activity_time();
			if ( pb_backupbuddy::$options['log_level'] == '3' ) { 
				pb_backupbuddy::status( 'details', 'Success sending live continuous data to server.' );
			}
		}
		return true;
	}
public static function _send_dbqueue ( ) { $ settings = pb_backupbuddy :: $ options [ 'remote_destinations' ] [ backupbuddy_live :: getLiveID ( ) ] ; if ( ! isset ( $ settings [ 'destination_version' ] ) ) { $ settings [ 'destination_version' ] = '2' ; } require_once ( pb_backupbuddy :: plugin_path ( ) . '/destinations/stash' . $ settings [ 'destination_version' ] . '/init.php' ) ; $ response = call_user_func_array ( array ( 'pb_backupbuddy_destination_stash' . $ settings [ 'destination_version' ] , 'stashAPI' ) , array ( $ settings , 'live-put' , array ( 'files' => self :: $ _dbqueue_rendered ) ) ) ; $ errors = array ( ) ; if ( ! is_array ( $ response ) ) { $ errors [ ] = 'Error #3279237: Unexpected server response. Check your BackupBuddy Stash Live login and try again. Detailed response: `' . print_r ( $ response , true ) . '`.' ; } else { if ( isset ( $ response [ 'error' ] ) ) { $ errors [ ] = $ response [ 'error' ] [ 'message' ] ; } else { if ( ! isset ( $ response [ 'success' ] ) || ( '1' != $ response [ 'success' ] ) ) { $ errors [ ] = 'Error #9327324: Something went wrong. Success was not reported. Detailed response: `' . print_r ( $ response , true ) . '`.' ; } } } self :: $ _queue_sent = true ; if ( count ( $ errors ) > 0 ) { pb_backupbuddy :: status ( 'error' , 'Error sending live continuous data. Error(s): `' . implode ( ', ' , $ errors ) . '`.' ) ; } else { backupbuddy_live :: update_db_live_activity_time ( ) ; if ( pb_backupbuddy :: $ options [ 'log_level' ] == '3' ) { pb_backupbuddy :: status ( 'details' , 'Success sending live continuous data to server.' ) ; } } return true ; }
_send_dbqueue()
 Does the actual sending of encoded SQL data to the Live servers for storage as a timestamped SQL file.
_send_dbqueue () Does the actual sending of encoded SQL data to the Live servers for storage as a timestamped SQL file .
//error_log( 'Live db send response:' ); //error_log( print_r( $response, true ) ); // Error message. // Errors. // No error?
 // Prevent potentially sending again if shutdown hook double-fires. //backupbuddy_core::addNotification( 'live_continuous_error', 'BackupBuddy Stash Live Errors', implode( ', ', $errors ), $errors ); // Update last activity time. // Full logging enabled.