]> 91.132.146.200 Git - insipid.git/commitdiff
added a new TODO and cleaned up summoner class
authorBanana <mail@bananas-playground.net>
Mon, 11 Sep 2023 09:54:00 +0000 (11:54 +0200)
committerBanana <mail@bananas-playground.net>
Mon, 11 Sep 2023 09:54:00 +0000 (11:54 +0200)
TODO
webroot/lib/summoner.class.php

diff --git a/TODO b/TODO
index 2b88b3d710708fb0d203191a764858169cd2878a..0795fe373885aeb0d58f5ecc1398c118bfc61653 100644 (file)
--- 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
index 80c454ceba2a0a6422330b6f4b7459978315b104..184153d6bcce5bbc8e8d4069196f08018b6f30de 100644 (file)
@@ -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
                        ) {