From 9885877aeba046dcde71f71ecc5c06f31c313e21 Mon Sep 17 00:00:00 2001 From: Banana Date: Sat, 2 Jan 2021 22:34:28 +0100 Subject: [PATCH] number save fix. adding link to collection in headline. updated todo --- TODO | 2 ++ documentation/requirements.txt | 2 +- webclient/lib/manageentry.class.php | 6 +++++- webclient/view/default/manageentry/manageentry.html | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/TODO b/TODO index 9f9887f..e602a65 100644 --- a/TODO +++ b/TODO @@ -8,3 +8,5 @@ * sort by filter for collection display * responsive and breakpoints * tag management. Edit, update and unused ones. +* imdb collector. Number storage -> runtime +* clickable image in card view diff --git a/documentation/requirements.txt b/documentation/requirements.txt index 91dd232..db2e14f 100644 --- a/documentation/requirements.txt +++ b/documentation/requirements.txt @@ -1,4 +1,4 @@ * A Webserver (tested on Apache 2.4) -* PHP 7+ with mysqli, mbstring +* PHP 7+ with mysqli, mbstring, curl * MySQL 8+ / MariaDB 10.2 * At least 20MB storage WITHOUT images diff --git a/webclient/lib/manageentry.class.php b/webclient/lib/manageentry.class.php index ad95a65..fc82ff8 100644 --- a/webclient/lib/manageentry.class.php +++ b/webclient/lib/manageentry.class.php @@ -577,7 +577,11 @@ class Manageentry { * @return mixed */ private function _saveField_number($data, $queryData) { - $queryData['init'][] = "`".$data['identifier']."` = ".$this->_DB->real_escape_string($data['valueToSave']).""; + // make sure there is something (int) to save + if(empty($data['valueToSave'])) { + $data['valueToSave'] = 0; + } + $queryData['init'][] = "`".$data['identifier']."` = '".$this->_DB->real_escape_string($data['valueToSave'])."'"; return $queryData; } diff --git a/webclient/view/default/manageentry/manageentry.html b/webclient/view/default/manageentry/manageentry.html index 96fc698..5cecbd4 100644 --- a/webclient/view/default/manageentry/manageentry.html +++ b/webclient/view/default/manageentry/manageentry.html @@ -4,10 +4,10 @@ if(!empty($TemplateData['editFields'])) { if(!empty($TemplateData['editData'])) { $_entry = $TemplateData['editData']['id']; ?> -

Update an entry in:

+

Update an entry in:

View entry

-

Add an entry to:

+

Add an entry to:

-- 2.39.5