mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 21:27:25 +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:
@@ -6,12 +6,6 @@
|
|||||||
* Released under the terms and conditions of the
|
* Released under the terms and conditions of the
|
||||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
* 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');
|
require_once('../class2.php');
|
||||||
@@ -187,6 +181,9 @@ class admin_start
|
|||||||
e107::getDebug()->logTime('Check Password Encryption');
|
e107::getDebug()->logTime('Check Password Encryption');
|
||||||
$this->checkPasswordEncryption();
|
$this->checkPasswordEncryption();
|
||||||
|
|
||||||
|
//Check if developer mode is enabled
|
||||||
|
$this->checkDeveloperMode();
|
||||||
|
|
||||||
|
|
||||||
if($this->refresh == true)
|
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()
|
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>";
|
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
|
//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>";
|
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_CHOOSE_FILE", "Choose a file");
|
||||||
|
|
||||||
define("LAN_REQUIRED", "Required");
|
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.");
|
Reference in New Issue
Block a user