From b1bfd79b80abb69735dc287ebe46e876e3ebc7c4 Mon Sep 17 00:00:00 2001 From: ghost Date: Thu, 17 Aug 2023 14:59:00 +0300 Subject: [PATCH] change DEFAULT_HOST_URL_REGEXP check from host to page URL --- src/library/helper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/library/helper.php b/src/library/helper.php index 6fda9b7..fa9e620 100644 --- a/src/library/helper.php +++ b/src/library/helper.php @@ -73,7 +73,7 @@ class Helper { if ($host = $db->findHostByCRC32URL(crc32($link->host->url))) { // Make sure host URL compatible with this host rules before continue - if (!preg_match(self::getHostSettingValue($db, $memory, $host->hostId, 'URL_REGEXP', DEFAULT_HOST_URL_REGEXP), $link->host->url)) { + if (!preg_match(self::getHostSettingValue($db, $memory, $host->hostId, 'URL_REGEXP', DEFAULT_HOST_URL_REGEXP), $link->page->url)) { return false; } @@ -85,7 +85,7 @@ class Helper { } else { // Make sure link compatible with default host rules before create new host - if (!preg_match(DEFAULT_HOST_URL_REGEXP, $link->host->url)) { + if (!preg_match(DEFAULT_HOST_URL_REGEXP, $link->page->url)) { return false; }