diff --git a/app/Controllers/Admin/Cloudflare/ZoneController.php b/app/Controllers/Admin/Cloudflare/ZoneController.php index 2a3c936..c45c7bf 100644 --- a/app/Controllers/Admin/Cloudflare/ZoneController.php +++ b/app/Controllers/Admin/Cloudflare/ZoneController.php @@ -63,7 +63,7 @@ class ZoneController extends CloudflareController } break; case 'hosts': - $formDatas[$field] = $this->request->getVar($field); + $formDatas[$field] = explode("\n", $this->request->getVar($field)); if (!is_array($formDatas[$field]) || !count($formDatas[$field])) { throw new \Exception("호스트명이 정의되지 않았습니다"); } diff --git a/app/Libraries/MyCloudflare/Account.php b/app/Libraries/MyCloudflare/Account.php index 0d0875b..6d82c5a 100644 --- a/app/Libraries/MyCloudflare/Account.php +++ b/app/Libraries/MyCloudflare/Account.php @@ -19,7 +19,7 @@ class Account extends MyCloudflare { return $this->getMySocket()->request($this->_authkey); } - final public function getMyStorage(): AccountModel + final protected function getMyStorage(): AccountModel { if ($this->_myStorage === null) { $this->_myStorage = new AccountModel(); diff --git a/app/Libraries/MyCloudflare/MyCloudflare.php b/app/Libraries/MyCloudflare/MyCloudflare.php index 224fd6c..eebc568 100644 --- a/app/Libraries/MyCloudflare/MyCloudflare.php +++ b/app/Libraries/MyCloudflare/MyCloudflare.php @@ -15,7 +15,7 @@ abstract class MyCloudflare extends CommonLibrary } abstract protected function getArrayByResult($result, array $formDatas = []): array; abstract protected function reload_entity($cf): mixed; - abstract public function getMyStorage(): mixed; + abstract protected function getMyStorage(): mixed; final protected function getMySocket(): CloudflareSocket { if ($this->_mySocket === null) { diff --git a/app/Libraries/MyCloudflare/Record.php b/app/Libraries/MyCloudflare/Record.php index a6e6d32..107620e 100644 --- a/app/Libraries/MyCloudflare/Record.php +++ b/app/Libraries/MyCloudflare/Record.php @@ -24,7 +24,7 @@ class Record extends MyCloudflare { return $this->getMySocket()->request($this->_account_entity->getAuthKey()); } - final public function getMyStorage(): RecordModel + final protected function getMyStorage(): RecordModel { if ($this->_myStorage === null) { $this->_myStorage = new RecordModel(); diff --git a/app/Libraries/MyCloudflare/Zone.php b/app/Libraries/MyCloudflare/Zone.php index 8fcb3f1..ef61de4 100644 --- a/app/Libraries/MyCloudflare/Zone.php +++ b/app/Libraries/MyCloudflare/Zone.php @@ -22,7 +22,7 @@ class Zone extends MyCloudflare { return $this->getMySocket()->request($this->_account_entity->getAuthKey()); } - final public function getMyStorage(): ZoneModel + final protected function getMyStorage(): ZoneModel { if ($this->_myStorage === null) { $this->_myStorage = new ZoneModel(); diff --git a/app/Models/UserModel.php b/app/Models/UserModel.php index 168eadf..6b0cdc3 100644 --- a/app/Models/UserModel.php +++ b/app/Models/UserModel.php @@ -35,7 +35,7 @@ class UserModel extends CommonModel { switch ($field) { case "id": - if ($this->getAction() == DB_ACTION["CREATE"]) { + if ($this->getAction() == 'create') { $rules[$field] = "required|trim|min_length[4]|max_length[20]|is_unique[{$this->table}.{$field}]"; } else { $rules[$field] = "required|trim|min_length[4]|max_length[20]";