rename class

master
Jean-Christian Paul Denis 2023-04-24 00:14:05 +02:00
parent 6fbd4b4866
commit 3f42099051
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
3 changed files with 6 additions and 6 deletions

View File

@ -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 {

View File

@ -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 {

View File

@ -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'));