diff --git a/app/Models/Cloudflare/AccountModel.php b/app/Models/Cloudflare/AccountModel.php index 6d49af0..2c097a3 100644 --- a/app/Models/Cloudflare/AccountModel.php +++ b/app/Models/Cloudflare/AccountModel.php @@ -98,6 +98,6 @@ class AccountModel extends CommonModel //List 검색용 public function setList_WordFilter(string $word): void { - $this->orLike(self::TABLE . self::TITLE, $word, 'both'); + $this->orLike(self::TABLE . "." . self::TITLE, $word, 'both'); } } diff --git a/app/Models/Cloudflare/AuditLogModel.php b/app/Models/Cloudflare/AuditLogModel.php index def73bd..d181fe4 100644 --- a/app/Models/Cloudflare/AuditLogModel.php +++ b/app/Models/Cloudflare/AuditLogModel.php @@ -88,7 +88,7 @@ class AuditLogModel extends CommonModel //List 검색용 public function setList_WordFilter(string $word): void { - $this->orLike(self::TABLE . self::TITLE, $word, 'both'); + $this->orLike(self::TABLE . "." . self::TITLE, $word, 'both'); $this->orLike(self::TABLE . '.zone_name', $word, 'both'); $this->orLike(self::TABLE . '.meta', $word, 'both'); $this->orLike(self::TABLE . '.resource', $word, 'both'); diff --git a/app/Models/Cloudflare/AuthModel.php b/app/Models/Cloudflare/AuthModel.php index 4080174..47ab38e 100644 --- a/app/Models/Cloudflare/AuthModel.php +++ b/app/Models/Cloudflare/AuthModel.php @@ -88,7 +88,7 @@ class AuthModel extends CommonModel } public function setList_WordFilter(string $word): void { - $this->orLike(self::TABLE . self::TITLE, $word, 'both'); + $this->orLike(self::TABLE . "." . self::TITLE, $word, 'both'); $this->orLike(self::TABLE . '.authkey', $word, 'both'); $this->orLike(self::TABLE . '.oldkey', $word, 'both'); } diff --git a/app/Models/Cloudflare/FirewallModel.php b/app/Models/Cloudflare/FirewallModel.php index 0507305..7a01b22 100644 --- a/app/Models/Cloudflare/FirewallModel.php +++ b/app/Models/Cloudflare/FirewallModel.php @@ -107,7 +107,7 @@ class FirewallModel extends CommonModel //List 검색용 public function setList_WordFilter(string $word): void { - $this->orLike(self::TABLE . self::TITLE, $word, 'both'); + $this->orLike(self::TABLE . "." . self::TITLE, $word, 'both'); $this->orLike(self::TABLE . '.expression', $word, 'both'); } } diff --git a/app/Models/Cloudflare/RecordModel.php b/app/Models/Cloudflare/RecordModel.php index 6259f97..5dcca59 100644 --- a/app/Models/Cloudflare/RecordModel.php +++ b/app/Models/Cloudflare/RecordModel.php @@ -111,19 +111,18 @@ class RecordModel extends CommonModel { return $this->modify_process($entity, $formDatas); } - //도메인이 이미 존재하는지 체크 + //host가 이미 존재하는지 체크 public function isUniqueHost($zone_uid, string $host, string $content): bool { $this->where(self::PARENT, $zone_uid); - $this->where('host', $host); - $this->where('content', $content); + $this->where(self::TABLE . '.host', $host); return is_null($this->first()) ? true : false; } //CDN값 수정 못하는 고정 Record 처리 public function setImmobilized(array $hosts) { if (count($hosts)) { - $this->whereIn('host', $hosts)->set(['fixed' => 'on'])->update(); + $this->whereIn(self::TABLE . '.host', $hosts)->set(['fixed' => 'on'])->update(); log_message("notice", "-----set fixed Records " . implode(",", $hosts) . "처리 완료-----"); } } @@ -133,7 +132,7 @@ class RecordModel extends CommonModel if ($this->isIPAddress($word, 'ipv4')) { $this->where(self::TABLE . '.content', $word); } else { - $this->orLike(self::TABLE . self::TITLE, $word, 'both'); + $this->orLike(self::TABLE . "." . self::TITLE, $word, 'both'); $this->orLike(self::TABLE . '.content', $word, 'both'); } } diff --git a/app/Models/Cloudflare/ZoneModel.php b/app/Models/Cloudflare/ZoneModel.php index 02d1419..875fac6 100644 --- a/app/Models/Cloudflare/ZoneModel.php +++ b/app/Models/Cloudflare/ZoneModel.php @@ -151,7 +151,7 @@ class ZoneModel extends CommonModel $zone_uids = array_column($recorde_entitys, RecordModel::PARENT); $this->orWhereIn(self::TABLE . '.' . self::PK, array_values($zone_uids)); } else { - $this->orLike(self::TABLE . self::TITLE, $word, 'both'); + $this->orLike(self::TABLE . "." . self::TITLE, $word, 'both'); $this->orLike(self::TABLE . '.name_servers', $word, 'both'); $this->orLike(self::TABLE . '.original_name_servers', $word, 'both'); } diff --git a/app/Models/MapurlModel.php b/app/Models/MapurlModel.php index 01f18a4..9931411 100644 --- a/app/Models/MapurlModel.php +++ b/app/Models/MapurlModel.php @@ -76,7 +76,7 @@ class MapurlModel extends CommonModel //List 검색용 public function setList_WordFilter(string $word): void { - $this->orLike(self::TABLE . self::TITLE, $word, 'both'); + $this->orLike(self::TABLE . "." . self::TITLE, $word, 'both'); $this->orLike(self::TABLE . '.new_url', $word, 'both'); } } diff --git a/app/Models/MyLogModel.php b/app/Models/MyLogModel.php index 7baa585..9c70498 100644 --- a/app/Models/MyLogModel.php +++ b/app/Models/MyLogModel.php @@ -69,7 +69,7 @@ class MyLogModel extends CommonModel //List 검색용 public function setList_WordFilter(string $word): void { - $this->orLike(self::TABLE . self::TITLE, $word, 'both'); + $this->orLike(self::TABLE . "." . self::TITLE, $word, 'both'); $this->orLike(self::TABLE . '.content', $word, 'both'); } } diff --git a/app/Models/UserModel.php b/app/Models/UserModel.php index 3b881e9..1b6ca1c 100644 --- a/app/Models/UserModel.php +++ b/app/Models/UserModel.php @@ -120,7 +120,7 @@ class UserModel extends CommonModel public function setList_WordFilter(string $word): void { $this->orLike(self::TABLE . '.id', $word, 'both'); - $this->orLike(self::TABLE . self::TITLE, $word, 'both'); + $this->orLike(self::TABLE . "." . self::TITLE, $word, 'both'); $this->orLike(self::TABLE . '.email', $word, 'both'); } } diff --git a/app/Models/UserSNSModel.php b/app/Models/UserSNSModel.php index 70d630d..33add72 100644 --- a/app/Models/UserSNSModel.php +++ b/app/Models/UserSNSModel.php @@ -104,7 +104,7 @@ class UserSNSModel extends CommonModel public function setList_WordFilter(string $word): void { $this->orLike(self::TABLE . '.id', $word, 'both'); - $this->orLike(self::TABLE . self::TITLE, $word, 'both'); + $this->orLike(self::TABLE . "." . self::TITLE, $word, 'both'); $this->orLike(self::TABLE . '.email', $word, 'both'); } }