mirror of
https://github.com/e107inc/e107.git
synced 2025-04-20 04:32:01 +02:00
Check for developer mode
Adds warning for ADMIN when developer mode is enabled, but when user is not on localhost (indicating developing).
This commit is contained in:
parent
2cddbaa5a2
commit
7ffad1f4d2
@ -6,12 +6,6 @@
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
*
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_admin/admin.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
require_once('../class2.php');
|
||||
@ -187,6 +181,9 @@ class admin_start
|
||||
e107::getDebug()->logTime('Check Password Encryption');
|
||||
$this->checkPasswordEncryption();
|
||||
|
||||
//Check if developer mode is enabled
|
||||
$this->checkDeveloperMode();
|
||||
|
||||
|
||||
if($this->refresh == true)
|
||||
{
|
||||
@ -539,6 +536,14 @@ TMPO;
|
||||
|
||||
}
|
||||
|
||||
private function checkDeveloperMode()
|
||||
{
|
||||
if(deftrue('e_DEVELOPER') && (strpos(e_SELF,'localhost') === false) && (strpos(e_SELF,'127.0.0.1') === false))
|
||||
{
|
||||
e107::getMessage()->addWarning(LAN_DEVELOPERMODE_CHECK);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function checkDependencies()
|
||||
{
|
||||
|
@ -780,6 +780,14 @@ if ($e107_popup != 1) {
|
||||
{
|
||||
echo "<div class='installer alert alert-danger alert-block text-center'><b>*** ".CORE_LAN4." ***</b><br />".CORE_LAN5."</div>";
|
||||
}
|
||||
|
||||
if(ADMIN && deftrue('e_DEVELOPER') && (strpos(e_SELF,'localhost') === false) && (strpos(e_SELF,'127.0.0.1') === false))
|
||||
{
|
||||
echo "<div class='installer alert alert-danger alert-block text-center'>".LAN_DEVELOPERMODE_CHECK."</div>";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//XXX TODO LAN in English.php
|
||||
echo "<noscript><div class='alert alert-block alert-error alert-danger'><strong>This web site requires that javascript be enabled. <a rel='external' href='http://activatejavascript.org'>Click here for instructions.</a>.</strong></div></noscript>";
|
||||
|
@ -147,3 +147,5 @@ define("LAN_PLEASEWAIT", "Please Wait");
|
||||
define("LAN_CHOOSE_FILE", "Choose a file");
|
||||
|
||||
define("LAN_REQUIRED", "Required");
|
||||
|
||||
define("LAN_DEVELOPERMODE_CHECK", "Developer mode is enabled. Only use this mode when actually developing. Make sure to disable when using this website in live production.");
|
Loading…
x
Reference in New Issue
Block a user