aboutsummaryrefslogtreecommitdiffstats
path: root/img_auth.php
diff options
context:
space:
mode:
authorTim Starling <tstarling@wikimedia.org>2019-09-03 09:55:00 +1000
committerTim Starling <tstarling@wikimedia.org>2019-09-03 11:43:18 +1000
commitb7ce7aacb0fb6803d9135f465e9cf6b48912883e (patch)
tree8341cf98271d5ad0db2df5998d82c6e08bc0913f /img_auth.php
parent7c9f1a122712362b5840aee0325e36b249cb79db (diff)
downloadmediawikicore-b7ce7aacb0fb6803d9135f465e9cf6b48912883e.tar.gz
mediawikicore-b7ce7aacb0fb6803d9135f465e9cf6b48912883e.zip
Add MW_REST_API and MW_ENTRY_POINT
Define the global constant MW_REST_API in rest.php, by analogy with MW_API. Also generalize this by adding MW_ENTRY_POINT, which contains the entry script name, "cli" or "unknown". This allows tests such as if ( MW_ENTRY_POINT !== 'index' ) which is probably what is really intended by defined('MW_API') in many cases. Change-Id: I24099f4cdd170de17afd6e1bbad67c9b204071fc
Diffstat (limited to 'img_auth.php')
-rw-r--r--img_auth.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/img_auth.php b/img_auth.php
index 6e45e4eba5a6..f23de4f4703f 100644
--- a/img_auth.php
+++ b/img_auth.php
@@ -39,6 +39,7 @@
*/
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()