From: Banana Date: Sat, 2 Jan 2021 21:34:28 +0000 (+0100) Subject: number save fix. adding link to collection in headline. updated todo X-Git-Tag: 1.0~18 X-Git-Url: http://91.132.146.200/gitweb/?a=commitdiff_plain;h=9885877aeba046dcde71f71ecc5c06f31c313e21;p=bibliotheca-php.git number save fix. adding link to collection in headline. updated todo --- 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: