diff --git a/src/ReservedWhiteList.php b/src/ReservedWhiteList.php index 5574295..d0da001 100644 --- a/src/ReservedWhiteList.php +++ b/src/ReservedWhiteList.php @@ -50,7 +50,7 @@ class ReservedWhiteList extends dcSpamFilter $throw = false; try { - $wlc = new Core(); + $wlc = new Utils(); if (true === $wlc->isReserved($author, $email)) { $status = 'reserved name'; @@ -75,7 +75,7 @@ class ReservedWhiteList extends dcSpamFilter public function gui(string $url): string { - $wlc = new Core(); + $wlc = new Utils(); $comments = []; try { diff --git a/src/UnmoderatedWhiteList.php b/src/UnmoderatedWhiteList.php index b5a0c52..6eca617 100644 --- a/src/UnmoderatedWhiteList.php +++ b/src/UnmoderatedWhiteList.php @@ -49,7 +49,7 @@ class UnmoderatedWhiteList extends dcSpamFilter } try { - $wlc = new Core(); + $wlc = new Utils(); if ($wlc->isUnmoderated($email)) { $status = 'unmoderated'; @@ -64,7 +64,7 @@ class UnmoderatedWhiteList extends dcSpamFilter public function gui(string $url): string { - $wlc = new Core(); + $wlc = new Utils(); $posts = $comments = []; try { diff --git a/src/Utils.php b/src/Utils.php index 154c06f..b84c328 100644 --- a/src/Utils.php +++ b/src/Utils.php @@ -24,7 +24,7 @@ use dcUtils; * @brief White list filters methods * @since 2.6 */ -class Core +class Utils { public $con; public $blog; @@ -36,7 +36,7 @@ class Core public function __construct() { $this->con = dcCore::app()->con; - $this->blog = dcCore::app()->con->escape(dcCore::app()->blog->id); + $this->blog = dcCore::app()->con->escapeStr((string) dcCore::app()->blog->id); $this->settings = dcCore::app()->blog->settings->get(My::id()); $this->unmoderated = self::decode($this->settings->get('unmoderated')); $this->reserved = self::decode($this->settings->get('reserved'));