From 8ef8e3c46f8a5a4f7ed92c32553d10f381972db9 Mon Sep 17 00:00:00 2001 From: Banana Date: Mon, 11 Sep 2023 11:54:00 +0200 Subject: [PATCH] added a new TODO and cleaned up summoner class --- TODO | 2 ++ webroot/lib/summoner.class.php | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/TODO b/TODO index 2b88b3d..0795fe3 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,6 @@ TODO / Feature list ++ Replace ifset https://www.php.net/manual/en/migration70.new-features.php#migration70.new-features.null-coalesce-op + from summoner.class.php + Whole Page snapshot + view table really still needed? + theme support diff --git a/webroot/lib/summoner.class.php b/webroot/lib/summoner.class.php index 80c454c..184153d 100644 --- a/webroot/lib/summoner.class.php +++ b/webroot/lib/summoner.class.php @@ -86,7 +86,7 @@ class Summoner { // text without any whitespace and special chars // but with Punctuation other # http://www.sql-und-xml.de/unicode-database/po.html - $pattern = '/[\p{L}\p{N}\p{Po}\-]/u'; + $pattern = '/[\p{L}\p{N}\p{Po}\-_]/u'; break; case 'digit': @@ -98,7 +98,7 @@ class Summoner { case 'pageTitle': // text with whitespace and without special chars // but with Punctuation - $pattern = '/[\p{L}\p{N}\p{Po}\p{Z}\s-]/u'; + $pattern = '/[\p{L}\p{N}\p{Po}\p{Z}\s\-_]/u'; break; # strange. the \p{M} is needed.. don't know why.. @@ -391,7 +391,7 @@ class Summoner { /** * a very simple HTTP_AUTH authentication. */ - static function simpleAuth() { + static function simpleAuth(): void { if (!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW']) || $_SERVER['PHP_AUTH_USER'] !== FRONTEND_USERNAME || $_SERVER['PHP_AUTH_PW'] !== FRONTEND_PASSWORD ) { -- 2.39.5