diff --git a/Web/Models/Repositories/BannedLinks.php b/Web/Models/Repositories/BannedLinks.php index 7a2960ce..7a44d99d 100644 --- a/Web/Models/Repositories/BannedLinks.php +++ b/Web/Models/Repositories/BannedLinks.php @@ -62,10 +62,11 @@ class BannedLinks public function genEntries($links, $uri): \Traversable { foreach ($links as $link) { - if (preg_match($link->getRegexpRule(), $uri)) { + if (preg_match($link->getRegexpRule(), $uri)) yield $link->getId(); else if ($this->isDomainBanned($link->getDomain())) yield $link->getId(); + } } public function check(string $url): ?array diff --git a/Web/Presenters/AwayPresenter.php b/Web/Presenters/AwayPresenter.php index 7b70c5c1..c24cb032 100644 --- a/Web/Presenters/AwayPresenter.php +++ b/Web/Presenters/AwayPresenter.php @@ -15,8 +15,6 @@ final class AwayPresenter extends OpenVKPresenter if (OPENVK_ROOT_CONF["openvk"]["preferences"]["susLinks"]["warnings"]) if (sizeof($checkBanEntries) > 0) $this->pass("openvk!Away->view", $checkBanEntries[0]); - } - } header("HTTP/1.0 302 Found"); header("X-Robots-Tag: noindex, nofollow, noarchive");