From aa741d9a8f6945fb6c19a1f5590e5f749aff7340 Mon Sep 17 00:00:00 2001 From: Banana Date: Sun, 3 Jan 2021 15:48:09 +0100 Subject: [PATCH] features. Some cleanup. Save number. Clickable image --- TODO | 3 ++- documentation/features.txt | 8 ++++++++ webclient/lib/manageentry.class.php | 3 +++ webclient/lib/summoner.class.php | 2 +- webclient/view/default/collections/collections.html | 3 ++- webclient/view/default/dashboard/dashboard.html | 2 ++ 6 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 documentation/features.txt diff --git a/TODO b/TODO index c5d0862..89d07a4 100644 --- a/TODO +++ b/TODO @@ -9,5 +9,6 @@ * responsive and breakpoints * tag management. Edit, update and unused ones. * imdb collector. Number storage -> runtime -* clickable image in card view * stats overview page. amount of entries. file and db storage. +* Export of an entry, collection or everything. Stored on disk. +* Import of the export diff --git a/documentation/features.txt b/documentation/features.txt new file mode 100644 index 0000000..a640b07 --- /dev/null +++ b/documentation/features.txt @@ -0,0 +1,8 @@ +Self hosted media management. Runs on a raspberry or any webserver (see requirements). +Supports multiple collections. Eg. movies, games and music. +Each collection has their own fields, which can freely arranged. +Multiple user accounts and rights on collection and each entry. +Theme support. +Export and import of everything, collection or only selective entries. +Search within default field and advanced search in every field. +Lightwight. diff --git a/webclient/lib/manageentry.class.php b/webclient/lib/manageentry.class.php index 97b1040..2e4661e 100644 --- a/webclient/lib/manageentry.class.php +++ b/webclient/lib/manageentry.class.php @@ -572,6 +572,8 @@ class Manageentry { /** * Create part of the insert statement for field type number + * Strips everything what is not a digit from it. + * * @param array $data * @param array $queryData * @return mixed @@ -581,6 +583,7 @@ class Manageentry { if(empty($data['valueToSave'])) { $data['valueToSave'] = 0; } + $data['valueToSave'] = preg_replace('/[^\p{N}]/u', '', $data['valueToSave']); $queryData['init'][] = "`".$data['identifier']."` = '".$this->_DB->real_escape_string($data['valueToSave'])."'"; return $queryData; } diff --git a/webclient/lib/summoner.class.php b/webclient/lib/summoner.class.php index 6ab6d26..123c7cd 100644 --- a/webclient/lib/summoner.class.php +++ b/webclient/lib/summoner.class.php @@ -105,7 +105,7 @@ class Summoner { case 'digit': // only numbers and digit // warning with negative numbers... - $pattern = '/[\p{N}\-]/'; + $pattern = '/[\p{N}\-]/u'; break; case 'pageTitle': diff --git a/webclient/view/default/collections/collections.html b/webclient/view/default/collections/collections.html index 2eb04bb..23a16bc 100644 --- a/webclient/view/default/collections/collections.html +++ b/webclient/view/default/collections/collections.html @@ -19,9 +19,10 @@
diff --git a/webclient/view/default/dashboard/dashboard.html b/webclient/view/default/dashboard/dashboard.html index 0c2b314..196cade 100644 --- a/webclient/view/default/dashboard/dashboard.html +++ b/webclient/view/default/dashboard/dashboard.html @@ -23,9 +23,11 @@
+ <?php echo $entry['fields']['coverimage']['displayname']; ?> +
-- 2.39.5