admin/public/js/plugins/dataTables/jquery.dataTables.js
function _fnBuildAjax( oSettings, data, fn )
	{
		// Compatibility with 1.9-, allow fnServerData and event to manipulate
		_fnCallbackFire( oSettings, 'aoServerParams', 'serverParams', [data] );
	
		// Convert to object based for 1.10+ if using the old scheme
		if ( data && data.__legacy ) {
			var tmp = {};
			var rbracket = /(.*?)\[\]$/;
	
			$.each( data, function (key, val) {
				var match = val.name.match(rbracket);
	
				if ( match ) {
					// Support for arrays
					var name = match[0];
	
					if ( ! tmp[ name ] ) {
						tmp[ name ] = [];
					}
					tmp[ name ].push( val.value );
				}
				else {
					tmp[val.name] = val.value;
				}
			} );
			data = tmp;
		}
	
		var ajaxData;
		var ajax = oSettings.ajax;
		var instance = oSettings.oInstance;
	
		if ( $.isPlainObject( ajax ) && ajax.data )
		{
			ajaxData = ajax.data;
	
			var newData = $.isFunction( ajaxData ) ?
				ajaxData( data ) :  // fn can manipulate data or return an object
				ajaxData;           // object or array to merge
	
			// If the function returned an object, use that alone
			data = $.isFunction( ajaxData ) && newData ?
				newData :
				$.extend( true, data, newData );
	
			// Remove the data property as we've resolved it already and don't want
			// jQuery to do it again (it is restored at the end of the function)
			delete ajax.data;
		}
	
		var baseAjax = {
			"data": data,
			"success": function (json) {
				var error = json.error || json.sError;
				if ( error ) {
					oSettings.oApi._fnLog( oSettings, 0, error );
				}
	
				oSettings.json = json;
				_fnCallbackFire( oSettings, null, 'xhr', [oSettings, json] );
				fn( json );
			},
			"dataType": "json",
			"cache": false,
			"type": oSettings.sServerMethod,
			"error": function (xhr, error, thrown) {
				var log = oSettings.oApi._fnLog;
	
				if ( error == "parsererror" ) {
					log( oSettings, 0, 'Invalid JSON response', 1 );
				}
				else {
					log( oSettings, 0, 'Ajax error', 7 );
				}
			}
		};
	
		if ( oSettings.fnServerData )
		{
			// DataTables 1.9- compatibility
			oSettings.fnServerData.call( instance,
				oSettings.sAjaxSource, data, fn, oSettings
			);
		}
		else if ( oSettings.sAjaxSource || typeof ajax === 'string' )
		{
			// DataTables 1.9- compatibility
			oSettings.jqXHR = $.ajax( $.extend( baseAjax, {
				url: ajax || oSettings.sAjaxSource
			} ) );
		}
		else if ( $.isFunction( ajax ) )
		{
			// Is a function - let the caller define what needs to be done
			oSettings.jqXHR = ajax.call( instance, data, fn, oSettings );
		}
		else
		{
			// Object to extend the base settings
			oSettings.jqXHR = $.ajax( $.extend( baseAjax, ajax ) );
	
			// Restore for next time around
			ajax.data = ajaxData;
		}
	}
function _fnBuildAjax( oSettings, data, fn )
	{
		// Compatibility with 1.9-, allow fnServerData and event to manipulate
		_fnCallbackFire( oSettings, 'aoServerParams', 'serverParams', [data] );
	
		// Convert to object based for 1.10+ if using the old scheme
		if ( data && data.__legacy ) {
			var tmp = {};
			var rbracket = /(.*?)\[\]$/;
	
			$.each( data, function (key, val) {
				var match = val.name.match(rbracket);
	
				if ( match ) {
					// Support for arrays
					var name = match[0];
	
					if ( ! tmp[ name ] ) {
						tmp[ name ] = [];
					}
					tmp[ name ].push( val.value );
				}
				else {
					tmp[val.name] = val.value;
				}
			} );
			data = tmp;
		}
	
		var ajaxData;
		var ajax = oSettings.ajax;
		var instance = oSettings.oInstance;
	
		if ( $.isPlainObject( ajax ) && ajax.data )
		{
			ajaxData = ajax.data;
	
			var newData = $.isFunction( ajaxData ) ?
				ajaxData( data ) :  // fn can manipulate data or return an object
				ajaxData;           // object or array to merge
	
			// If the function returned an object, use that alone
			data = $.isFunction( ajaxData ) && newData ?
				newData :
				$.extend( true, data, newData );
	
			// Remove the data property as we've resolved it already and don't want
			// jQuery to do it again (it is restored at the end of the function)
			delete ajax.data;
		}
	
		var baseAjax = {
			"data": data,
			"success": function (json) {
				var error = json.error || json.sError;
				if ( error ) {
					oSettings.oApi._fnLog( oSettings, 0, error );
				}
	
				oSettings.json = json;
				_fnCallbackFire( oSettings, null, 'xhr', [oSettings, json] );
				fn( json );
			},
			"dataType": "json",
			"cache": false,
			"type": oSettings.sServerMethod,
			"error": function (xhr, error, thrown) {
				var log = oSettings.oApi._fnLog;
	
				if ( error == "parsererror" ) {
					log( oSettings, 0, 'Invalid JSON response', 1 );
				}
				else {
					log( oSettings, 0, 'Ajax error', 7 );
				}
			}
		};
	
		if ( oSettings.fnServerData )
		{
			// DataTables 1.9- compatibility
			oSettings.fnServerData.call( instance,
				oSettings.sAjaxSource, data, fn, oSettings
			);
		}
		else if ( oSettings.sAjaxSource || typeof ajax === 'string' )
		{
			// DataTables 1.9- compatibility
			oSettings.jqXHR = $.ajax( $.extend( baseAjax, {
				url: ajax || oSettings.sAjaxSource
			} ) );
		}
		else if ( $.isFunction( ajax ) )
		{
			// Is a function - let the caller define what needs to be done
			oSettings.jqXHR = ajax.call( instance, data, fn, oSettings );
		}
		else
		{
			// Object to extend the base settings
			oSettings.jqXHR = $.ajax( $.extend( baseAjax, ajax ) );
	
			// Restore for next time around
			ajax.data = ajaxData;
		}
	}
function _fnBuildAjax ( oSettings , data , fn ) { // Compatibility with 1.9-, allow fnServerData and event to manipulate
 _fnCallbackFire ( oSettings , 'aoServerParams' , 'serverParams' , [ data ] ) ; // Convert to object based for 1.10+ if using the old scheme
 if ( data && data . __legacy ) { var tmp = { } ; var rbracket = / (.*?)\[\]$ / ; $ . each ( data , function ( key , val ) { var match = val . name . match ( rbracket ) ; if ( match ) { // Support for arrays
 var name = match [ 0 ] ; if ( ! tmp [ name ] ) { tmp [ name ] = [ ] ; } tmp [ name ] . push ( val . value ) ; } else { tmp [ val . name ] = val . value ; } } ) ; data = tmp ; } var ajaxData ; var ajax = oSettings . ajax ; var instance = oSettings . oInstance ; if ( $ . isPlainObject ( ajax ) && ajax . data ) { ajaxData = ajax . data ; var newData = $ . isFunction ( ajaxData ) ? ajaxData ( data ) : // fn can manipulate data or return an object
 ajaxData ; // object or array to merge
 // If the function returned an object, use that alone
 data = $ . isFunction ( ajaxData ) && newData ? newData : $ . extend ( true , data , newData ) ; // Remove the data property as we've resolved it already and don't want
 // jQuery to do it again (it is restored at the end of the function)
 delete ajax . data ; } var baseAjax = { "data" : data , "success" : function ( json ) { var error = json . error || json . sError ; if ( error ) { oSettings . oApi . _fnLog ( oSettings , 0 , error ) ; } oSettings . json = json ; _fnCallbackFire ( oSettings , null , 'xhr' , [ oSettings , json ] ) ; fn ( json ) ; } , "dataType" : "json" , "cache" : false , "type" : oSettings . sServerMethod , "error" : function ( xhr , error , thrown ) { var log = oSettings . oApi . _fnLog ; if ( error == "parsererror" ) { log ( oSettings , 0 , 'Invalid JSON response' , 1 ) ; } else { log ( oSettings , 0 , 'Ajax error' , 7 ) ; } } } ; if ( oSettings . fnServerData ) { // DataTables 1.9- compatibility
 oSettings . fnServerData . call ( instance , oSettings . sAjaxSource , data , fn , oSettings ) ; } else if ( oSettings . sAjaxSource || typeof ajax === 'string' ) { // DataTables 1.9- compatibility
 oSettings . jqXHR = $ . ajax ( $ . extend ( baseAjax , { url : ajax || oSettings . sAjaxSource } ) ) ; } else if ( $ . isFunction ( ajax ) ) { // Is a function - let the caller define what needs to be done
 oSettings . jqXHR = ajax . call ( instance , data , fn , oSettings ) ; } else { // Object to extend the base settings
 oSettings . jqXHR = $ . ajax ( $ . extend ( baseAjax , ajax ) ) ; // Restore for next time around
 ajax . data = ajaxData ; } }
Create an Ajax call based on the table's settings, taking into account that
parameters can have multiple forms, and backwards compatibility.

@param {object} oSettings dataTables settings object
@param {array} data Data to send to the server, required by
DataTables - may be augmented by developer callbacks
@param {function} fn Callback function to run when data is obtained
Create an Ajax call based on the table s settings taking into account that parameters can have multiple forms and backwards compatibility .