|
|
@ -365,7 +365,7 @@ Class ApiController extends Controller { |
|
|
|
|
|
|
|
|
|
|
|
$ip = $this->getUserIp(); |
|
|
|
$ip = $this->getUserIp(); |
|
|
|
$logDir = __DIR__ . '/../runtime/admin/'; |
|
|
|
$logDir = __DIR__ . '/../runtime/admin/'; |
|
|
|
$logFile = "{$logDir}{$ip}.cache"; |
|
|
|
$logFile = "{$logDir}" . md5(FSC::$app['config']['md5Prefix'] . $ip) . ".cache"; |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
if (file_exists($logFile)) { |
|
|
|
if (file_exists($logFile)) { |
|
|
@ -379,7 +379,7 @@ Class ApiController extends Controller { |
|
|
|
protected function saveAdmUserData($data) { |
|
|
|
protected function saveAdmUserData($data) { |
|
|
|
$ip = $this->getUserIp(); |
|
|
|
$ip = $this->getUserIp(); |
|
|
|
$logDir = __DIR__ . '/../runtime/admin/'; |
|
|
|
$logDir = __DIR__ . '/../runtime/admin/'; |
|
|
|
$logFile = "{$logDir}{$ip}.cache"; |
|
|
|
$logFile = "{$logDir}" . md5(FSC::$app['config']['md5Prefix'] . $ip) . ".cache"; |
|
|
|
if (!is_dir($logDir)) { //try to mkdir |
|
|
|
if (!is_dir($logDir)) { //try to mkdir |
|
|
|
@mkdir($logDir, 0700, true); |
|
|
|
@mkdir($logDir, 0700, true); |
|
|
|
} |
|
|
|
} |
|
|
|