Add MW_REST_API and MW_ENTRY_POINT
authorTim Starling <tstarling@wikimedia.org>
Mon, 2 Sep 2019 23:55:00 +0000 (09:55 +1000)
committerTim Starling <tstarling@wikimedia.org>
Tue, 3 Sep 2019 01:43:18 +0000 (11:43 +1000)
commitb7ce7aacb0fb6803d9135f465e9cf6b48912883e
tree8341cf98271d5ad0db2df5998d82c6e08bc0913f
parent7c9f1a122712362b5840aee0325e36b249cb79db
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
api.php
img_auth.php
includes/Setup.php
index.php
load.php
maintenance/Maintenance.php
opensearch_desc.php
profileinfo.php
rest.php
thumb.php
thumb_handler.php