diff --git a/app/Controllers/Admin/Cloudflare/RecordController.php b/app/Controllers/Admin/Cloudflare/RecordController.php index 438523e..d6a7574 100644 --- a/app/Controllers/Admin/Cloudflare/RecordController.php +++ b/app/Controllers/Admin/Cloudflare/RecordController.php @@ -57,7 +57,7 @@ class RecordController extends CloudflareController { switch ($field) { case 'hosts': - $formDatas[$field] = explode("\n", $this->request->getVar($field)); + $formDatas[$field] = explode("\n", $this->request->getPost($field)); if (!is_array($this->formDatas[$field]) || !count($this->formDatas[$field])) { throw new \Exception("호스트명이 정의되지 않았습니다."); } diff --git a/app/Controllers/Admin/Cloudflare/ZoneController.php b/app/Controllers/Admin/Cloudflare/ZoneController.php index 4affec4..184c05d 100644 --- a/app/Controllers/Admin/Cloudflare/ZoneController.php +++ b/app/Controllers/Admin/Cloudflare/ZoneController.php @@ -62,13 +62,13 @@ class ZoneController extends CloudflareController { switch ($field) { case 'domains': - $formDatas[$field] = explode("\n", $this->request->getVar($field)); + $formDatas[$field] = explode("\n", $this->request->getPost($field)); if (!is_array($formDatas[$field]) || !count($formDatas[$field])) { throw new \Exception("도메인명이 정의되지 않았습니다."); } break; case 'hosts': - $formDatas[$field] = $this->request->getVar($field); + $formDatas[$field] = $this->request->getPost($field); if (!is_array($formDatas[$field]) || !count($formDatas[$field])) { throw new \Exception("호스트명이 정의되지 않았습니다"); } diff --git a/app/Controllers/Admin/UserController.php b/app/Controllers/Admin/UserController.php index 7cd053c..983a366 100644 --- a/app/Controllers/Admin/UserController.php +++ b/app/Controllers/Admin/UserController.php @@ -114,7 +114,7 @@ class UserController extends AdminController $this->field_rules = $this->getModel()->getFieldRules($this->action, $this->fields); $this->filter_fields = ['role', 'status']; $this->field_options = $this->getFormFieldOptions($this->filter_fields); - $this->batchjob_fields = ['role', 'status']; + $this->batchjob_fields = ['status']; return $this->list_procedure(); } // Download diff --git a/app/Controllers/MVController.php b/app/Controllers/MVController.php index 139b053..5cb13d1 100644 --- a/app/Controllers/MVController.php +++ b/app/Controllers/MVController.php @@ -64,7 +64,7 @@ abstract class MVController extends CommonController { switch ($field) { default: - $formDatas[$field] = $this->request->getVar($field); + $formDatas[$field] = $this->request->getPost($field); break; } return $formDatas; @@ -79,7 +79,7 @@ abstract class MVController extends CommonController // 생성 protected function create_validate(string $action, array $fields): void { - //변경할 값 확인 : Upload된 파일 검증시 $this->request->getVar()보다 먼처 체크필요 + //변경할 값 확인 : Upload된 파일 검증시 $this->request->getPOST()보다 먼처 체크필요 $this->validation = $this->setFormFieldRules($fields, service('validation'), $action); if (!$this->validation->withRequest($this->request)->run()) { throw new \Exception("{$this->class_name} 작업 데이터 검증 오류발생\n" . implode( @@ -137,7 +137,7 @@ abstract class MVController extends CommonController // 수정 protected function modify_validate(string $action, array $fields): void { - //변경할 값 확인 : Upload된 파일 검증시 $this->request->getVar()보다 먼처 체크필요 + //변경할 값 확인 : Upload된 파일 검증시 $this->request->getPost()보다 먼처 체크필요 $this->validation = $this->setFormFieldRules($fields, service('validation'), $action); if (!$this->validation->withRequest($this->request)->run()) { throw new \Exception("{$this->class_name} 작업 데이터 검증 오류발생\n" . implode( @@ -176,7 +176,7 @@ abstract class MVController extends CommonController //자신정보정의 $this->entity = $this->getModel()->getEntityByPK($uid); if ($this->entity === null) { - throw new \Exception(__FUNCTION__, " => {$uid} 정보를 찾을수 없습니다."); + throw new \Exception(__FUNCTION__ . " => {$uid} 정보를 찾을수 없습니다."); } $this->entity = $this->getModel()->modify($this->entity, $this->formDatas); } @@ -210,9 +210,9 @@ abstract class MVController extends CommonController $this->getModel()->transStart(); try { //변경할 UIDS - $uids = $this->request->getVar('batchjob_uids[]'); - if ($uids === null || !count($uids)) { - throw new \Exception("지정된 정보가 없습니다."); + $uids = $this->request->getPost('batchjob_uids'); + if ($uids === null || !is_array($uids) || count($uids) === 0) { + throw new \Exception("적용할 리스트를 선택하셔야합니다."); } foreach ($uids as $uid) { $this->modify_process($uid); @@ -364,7 +364,6 @@ abstract class MVController extends CommonController { try { helper(['form']); - $this->forms = ['attributes' => ['method' => "post",], 'hiddens' => []]; //URL처리 $this->uri = $this->request->getUri(); //total 처리 diff --git a/app/Helpers/CommonHelper.php b/app/Helpers/CommonHelper.php index 2e3657c..eb3af42 100644 --- a/app/Helpers/CommonHelper.php +++ b/app/Helpers/CommonHelper.php @@ -208,7 +208,7 @@ abstract class CommonHelper } $viewDatas['uri']->addQuery('order_field', $field); $viewDatas['uri']->addQuery('order_value', $viewDatas['order_value'] == 'DESC' ? "ASC" : "DESC"); - $label = anchor((string) $viewDatas['uri'], $label); + $label = anchor(current_url() . ($viewDatas['uri']->getQuery() ? "?" . $viewDatas['uri']->getQuery() : ""), $label); break; } return $label; diff --git a/app/Views/admin/index.php b/app/Views/admin/index.php index ecb3b7d..8d2bd40 100644 --- a/app/Views/admin/index.php +++ b/app/Views/admin/index.php @@ -10,6 +10,7 @@
include("templates/{$viewDatas['layout']}/index_content_top"); ?> + 'batchjob_form', 'method' => "post"]) ?> @@ -40,8 +41,9 @@
+ include("templates/{$viewDatas['layout']}/index_content_batchjob"); ?> +
- include("templates/{$viewDatas['layout']}/index_content_batchjob"); ?>
include("templates/{$viewDatas['layout']}/modal_form"); ?>
diff --git a/app/Views/templates/admin/index_content_batchjob.php b/app/Views/templates/admin/index_content_batchjob.php index 7fe6f77..6dd30e1 100644 --- a/app/Views/templates/admin/index_content_batchjob.php +++ b/app/Views/templates/admin/index_content_batchjob.php @@ -1,35 +1,33 @@
- -
\ No newline at end of file