3 $wgRequestTime = microtime();
6 @ini_set
( 'allow_url_fopen', 0 ); # For security...
8 # Valid web server entry point, enable includes.
9 # Please don't move this line to includes/Defines.php. This line essentially defines
10 # a valid entry point. If you put it in includes/Defines.php, then any script that includes
11 # it becomes an entry point, thereby defeating its purpose.
12 define( 'MEDIAWIKI', true );
13 require_once( './includes/Defines.php' );
14 require_once( './LocalSettings.php' );
15 require_once( 'includes/Setup.php' );
16 require_once( 'includes/AjaxFunctions.php' );
22 wfProfileIn( 'main-misc-setup' );
24 header( 'Content-Type: text/html; charset=utf-8', true );
26 // List of exported PHP functions
27 $sajax_export_list = array( 'wfSajaxSearch' );
31 $wgAjaxCachePolicy = new AjaxCachePolicy();
33 if (! empty($_GET["rs"])) {
37 if (!empty($_POST["rs"])) {
46 $func_name = $_GET["rs"];
47 if (! empty($_GET["rsargs"])) {
48 $args = $_GET["rsargs"];
53 $func_name = $_POST["rs"];
54 if (! empty($_POST["rsargs"])) {
55 $args = $_POST["rsargs"];
61 if (! in_array($func_name, $sajax_export_list)) {
62 echo "-:$func_name not callable";
65 $result = call_user_func_array($func_name, $args);
66 $wgAjaxCachePolicy->writeHeader();