mirror of
https://github.com/standardebooks/web.git
synced 2025-07-07 07:10:29 -04:00
Move SITE_STATUS definition into INI file so that CLI can read it too
This commit is contained in:
parent
beda605f32
commit
395d4d9f9b
5 changed files with 21 additions and 5 deletions
|
@ -6,7 +6,8 @@ use function Safe\strtotime;
|
|||
|
||||
const SITE_STATUS_LIVE = 'live';
|
||||
const SITE_STATUS_DEV = 'dev';
|
||||
define('SITE_STATUS', getenv('SITE_STATUS') ?: SITE_STATUS_DEV); // Set in the PHP FPM pool configuration. Have to use define() and not const so we can use a function.
|
||||
|
||||
define('SITE_STATUS', get_cfg_var('site_status') ?: SITE_STATUS_DEV); // Set in the PHP INI configuration for both CLI and FPM. Have to use define() and not const so we can use a function.
|
||||
|
||||
// No trailing slash on any of the below constants.
|
||||
if(SITE_STATUS == SITE_STATUS_LIVE){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue