diff --git a/xmlhttprequest.php b/xmlhttprequest.php new file mode 100644 index 0000000000..eba5e07652 --- /dev/null +++ b/xmlhttprequest.php @@ -0,0 +1,48 @@ +. + +/** + * WARNING: This approach for doing AJAX calls is now deprecated in favor of the + * new REST API. + * + * @package MantisBT + * @copyright Copyright 2000 - 2002 Kenzaburo Ito - kenito@300baud.org + * @copyright Copyright 2002 MantisBT Team - mantisbt-dev@lists.sourceforge.net + * @link http://www.mantisbt.org + * + * @uses core.php + * @uses authentication_api.php + * @uses gpc_api.php + * @uses logging_api.php + */ + +require_once( 'core.php' ); +require_api( 'authentication_api.php' ); +require_api( 'gpc_api.php' ); +require_api( 'logging_api.php' ); + +auth_ensure_user_authenticated(); + +$f_entrypoint = gpc_get_string( 'entrypoint' ); + +$t_function = 'xmlhttprequest_' . $f_entrypoint; +if( function_exists( $t_function ) ) { + log_event( LOG_AJAX, 'Calling {' . $t_function . '}...' ); + call_user_func( $t_function ); +} else { + log_event( LOG_AJAX, 'Unknown function for entry point = ' . $t_function ); + echo 'unknown entry point'; +}