This commit is contained in:
liugang
2019-07-30 11:12:06 +08:00
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -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'));
}
+2 -1
View File
@@ -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')
{