// So extensions (and other code) can check whether they're running in API mode
define( 'MW_API', true );
+define( 'MW_ENTRY_POINT', 'api' );
require __DIR__ . '/includes/WebStart.php';
*/
define( 'MW_NO_OUTPUT_COMPRESSION', 1 );
+define( 'MW_ENTRY_POINT', 'img_auth' );
require __DIR__ . '/includes/WebStart.php';
# Set action base paths so that WebRequest::getPathInfo()
die( 'MediaWiki does not support installations where mbstring.func_overload is non-zero.' );
}
+// Define MW_ENTRY_POINT if it's not already, so that config code can check the
+// value without using defined()
+if ( !defined( 'MW_ENTRY_POINT' ) ) {
+ /**
+ * The entry point, which may be either the script filename without the
+ * file extension, or "cli" for maintenance scripts, or "unknown" for any
+ * entry point that does not set the constant.
+ */
+ define( 'MW_ENTRY_POINT', 'unknown' );
+}
+
// Start the autoloader, so that extensions can derive classes from core files
require_once "$IP/includes/AutoLoader.php";
* @file
*/
+define( 'MW_ENTRY_POINT', 'index' );
+
// Bail on old versions of PHP, or if composer has not been run yet to install
// dependencies. Using dirname( __FILE__ ) here because __DIR__ is PHP5.3+.
// phpcs:ignore MediaWiki.Usage.DirUsage.FunctionFound
// details of the session. Enforce this constraint with respect to session use.
define( 'MW_NO_SESSION', 1 );
+define( 'MW_ENTRY_POINT', 'load' );
+
require __DIR__ . '/includes/WebStart.php';
// URL safety checks
* @defgroup Maintenance Maintenance
*/
+define( MW_ENTRY_POINT, 'cli' );
+
// Bail on old versions of PHP, or if composer has not been run yet to install
// dependencies.
require_once __DIR__ . '/../includes/PHPVersionCheck.php';
// details of the session. Enforce this constraint with respect to session use.
define( 'MW_NO_SESSION', 1 );
+define( 'MW_ENTRY_POINT', 'opensearch_desc' );
+
require_once __DIR__ . '/includes/WebStart.php';
if ( $wgRequest->getVal( 'ctype' ) == 'application/xml' ) {
// details of the session. Enforce this constraint with respect to session use.
define( 'MW_NO_SESSION', 1 );
+define( 'MW_ENTRY_POINT', 'profileinfo' );
+
ini_set( 'zlib.output_compression', 'off' );
require __DIR__ . '/includes/WebStart.php';
use MediaWiki\Rest\EntryPoint;
+define( 'MW_REST_API', true );
+define( 'MW_ENTRY_POINT', 'rest' );
+
require __DIR__ . '/includes/WebStart.php';
EntryPoint::main();
use MediaWiki\MediaWikiServices;
define( 'MW_NO_OUTPUT_COMPRESSION', 1 );
+define( 'MW_ENTRY_POINT', 'thumb' );
require __DIR__ . '/includes/WebStart.php';
// Don't use fancy MIME detection, just check the file extension for jpg/gif/png
*/
define( 'THUMB_HANDLER', true );
+define( 'MW_ENTRY_POINT', 'thumb_handler' );
// Execute thumb.php, having set THUMB_HANDLER so that
// it knows to extract params from a thumbnail file URL.