forked from davist11/Environment-EE-Addon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Forked project. Tweaked styles. Made it compatible with NSM Bootstrap.
- Loading branch information
Showing
2 changed files
with
21 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,9 @@ | ||
Display which environment you are on **at all times** in the CP so you don't accidentally do something bad on the production environment. In your config.php, set an ENV variable like so: | ||
This is a fork from https://github.com/davist11/Environment-EE-Addon | ||
|
||
<pre>if(!defined('ENV')) { | ||
switch ($_SERVER['SERVER_NAME']) { | ||
case 'site.com': | ||
define('ENV', 'prod'); | ||
break; | ||
|
||
case 'stage.site.com': | ||
define('ENV', 'staging'); | ||
break; | ||
|
||
default: | ||
define('ENV', 'local'); | ||
break; | ||
} | ||
}</pre> | ||
We modified it to pull the NSM_ENV variable from Config Bootstrap. | ||
|
||
The value of ENV will be injected into the header of the CP and fixed to the screen as you scroll. | ||
Display which environment you are on **at all times** in the CP so you don't accidentally do something bad on the production environment. | ||
|
||
The value of NSM_ENV will be injected into the header of the CP and fixed to the screen as you scroll. | ||
|
||
*Note: only shown to Super Admins.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters