cfmgrv3 init...3
This commit is contained in:
parent
25ab3b8faf
commit
dc41b7c76a
@ -6,7 +6,6 @@ use App\Models\Cloudflare\API\AuthModel;
|
|||||||
use CodeIgniter\HTTP\RequestInterface;
|
use CodeIgniter\HTTP\RequestInterface;
|
||||||
use CodeIgniter\HTTP\ResponseInterface;
|
use CodeIgniter\HTTP\ResponseInterface;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
use App\Libraries\Log\Log;
|
|
||||||
|
|
||||||
class AuthController extends APIController
|
class AuthController extends APIController
|
||||||
{
|
{
|
||||||
|
|||||||
@ -172,20 +172,22 @@ class CommonController extends BaseController
|
|||||||
}
|
}
|
||||||
protected function update_validate($entity)
|
protected function update_validate($entity)
|
||||||
{
|
{
|
||||||
|
|
||||||
//변경된 값 적용
|
//변경된 값 적용
|
||||||
|
|
||||||
|
$this->_viewDatas['fieldDatas'] = array();
|
||||||
foreach ($this->_viewDatas['fields'] as $field) {
|
foreach ($this->_viewDatas['fields'] as $field) {
|
||||||
$logs = array();
|
$logs = array();
|
||||||
$value = rtrim($this->request->getVar($field));
|
$value = rtrim($this->request->getVar($field));
|
||||||
if ($entity->$field != $value) {
|
$log = "{$entity->getTitle()}의 {$field} : {$entity->$field}=>{$value}";
|
||||||
$log = "{$entity->getTitle()}의 {$field} : {$entity->$field}=>{$value}";
|
//암호는 보안상 log에 남지 않게하기 위함
|
||||||
//암호는 보안상 log에 남지 않게하기 위함
|
if ($field != 'passwd') {
|
||||||
if ($field != 'passwd') {
|
Log::add("info", $log);
|
||||||
Log::add("info", $log);
|
|
||||||
}
|
|
||||||
array_push($logs, $log);
|
|
||||||
$entity->$field = $this->_viewDatas['fieldDatas'][$field] = $value;
|
|
||||||
}
|
}
|
||||||
|
array_push($logs, $log);
|
||||||
|
$entity->$field = $this->_viewDatas['fieldDatas'][$field] = $value;
|
||||||
}
|
}
|
||||||
|
// throw new \Exception(var_export($this->_viewDatas['fieldDatas'], true));
|
||||||
if (!$entity->hasChanged()) {
|
if (!$entity->hasChanged()) {
|
||||||
throw new \Exception("새로 변경된 값이 없습니다." . var_export($logs, true));
|
throw new \Exception("새로 변경된 값이 없습니다." . var_export($logs, true));
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user