Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
@@ -15,7 +15,8 @@ class editor extends control
|
||||
{
|
||||
parent::__construct($moduleName, $methodName, $appName);
|
||||
|
||||
$this->active = helper::getRemoteIp() == '127.0.0.1';
|
||||
$remoteIp = helper::getRemoteIp();
|
||||
$this->active = ($remoteIp == '127.0.0.1' or $remoteIp == '::1');
|
||||
$methodName = $this->app->getMethodName();
|
||||
if(!$this->active and $methodName != 'index' and $methodName != 'extend') die($this->display('editor', 'deny'));
|
||||
}
|
||||
|
||||
@@ -23,7 +23,8 @@ class translate extends control
|
||||
{
|
||||
parent::__construct($moduleName, $methodName);
|
||||
|
||||
$this->active = helper::getRemoteIp() == '127.0.0.1';
|
||||
$remoteIp = helper::getRemoteIp();
|
||||
$this->active = ($remoteIp == '127.0.0.1' or $remoteIp == '::1');
|
||||
if(!$this->active) $this->app->loadLang('editor');
|
||||
if(!$this->active and $this->app->getMethodName() != 'index')
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user