From: Banana Date: Wed, 6 Jan 2021 14:30:21 +0000 (+0100) Subject: first usable version. 1.0 Castle X-Git-Tag: 1.0^0 X-Git-Url: http://91.132.146.200/gitweb/?a=commitdiff_plain;h=f61d42aeb852b33106d84e05dee3c09c19ebd0cf;p=bibliotheca-php.git first usable version. 1.0 Castle --- diff --git a/README b/README index 7abbcfd..aec403d 100644 --- a/README +++ b/README @@ -3,6 +3,11 @@ https://www.bananas-playground.net/projekt/bibliotheca/ ## Usage +Self hosted collection management for movies, music or games. +Install it on your own webserver (see requirements) and store the information +about your collected stuff. +Accessible and usable with a browser. Runs also off a Rapsberry Pi. +Tag and category support. Fulltext search an individual fields per collection. ## Technical information This is build and tested on a linux based OS. Windows support not yet, but it could work. diff --git a/VERSION b/VERSION index df1e03b..07e97bc 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,7 @@ -1.0 - Castle - (tba) +1.0 - Castle - (20210106) * First usable version + * Using as a collection management software will work + * Rights management needs tweeking, so use the admin account for a start + * Documentation covers the basics + * Use it and give feedback. + * Also, make backups. diff --git a/webclient/api.php b/webclient/api.php index ac9fbe3..506369b 100644 --- a/webclient/api.php +++ b/webclient/api.php @@ -17,9 +17,9 @@ */ # set to true if you need debug messages in error log file -define('DEBUG',true); +define('DEBUG',false); # set to ture if you need query log messages in error log file. -define('QUERY_DEBUG',true); +define('QUERY_DEBUG',false); require_once './config/path.php'; require_once './config/system.php'; diff --git a/webclient/index.php b/webclient/index.php index 61aa3d6..81a0c6f 100644 --- a/webclient/index.php +++ b/webclient/index.php @@ -17,9 +17,9 @@ */ # set to true if you need debug messages in error log file -define('DEBUG',true); +define('DEBUG',false); # set to ture if you need query log messages in error log file. -define('QUERY_DEBUG',true); +define('QUERY_DEBUG',false); require_once './config/path.php'; require_once './config/system.php'; diff --git a/webclient/lib/mancubus.class.php b/webclient/lib/mancubus.class.php index e8d2766..3281ef2 100644 --- a/webclient/lib/mancubus.class.php +++ b/webclient/lib/mancubus.class.php @@ -180,6 +180,7 @@ class Mancubus { * 'colName' => 'column name to search in', * 'colValue' => 'Value to search for', * 'fieldData' => field data from Trite->getCollectionFields() + * 'exactTagMatch' => true to make a binary compare. false for match against search * ) * * @param array $searchData @@ -209,7 +210,13 @@ class Mancubus { $queryJoin = " LEFT JOIN `".DB_PREFIX."_collection_entry2lookup_".$this->_DB->real_escape_string($this->_collectionId)."` AS e2l ON e2l.fk_entry=t.id"; $queryWhere .= " AND e2l.fk_field = '".$this->_DB->real_escape_string($sd['fieldData']['id'])."'"; - $queryWhere .= " AND MATCH (e2l.value) AGAINST ('".$this->_DB->real_escape_string($sd['colValue'])."' IN BOOLEAN MODE)"; + if(isset($sd['exactTagMatch']) && $sd['exactTagMatch'] === true) { + $queryWhere .= " AND e2l.value = BINARY '".$this->_DB->real_escape_string($sd['colValue'])."'"; + $_isFulltext = false; + } + else { + $queryWhere .= " AND MATCH (e2l.value) AGAINST ('".$this->_DB->real_escape_string($sd['colValue'])."' IN BOOLEAN MODE)"; + } } elseif ($sd['fieldData']['searchtype'] == "entrySingleNum" && strstr($sd['colValue'],'<')) { $_s = str_replace('<','',$sd['colValue']); diff --git a/webclient/view/default/collections/collections.php b/webclient/view/default/collections/collections.php index 4372912..88c9cbd 100644 --- a/webclient/view/default/collections/collections.php +++ b/webclient/view/default/collections/collections.php @@ -74,7 +74,8 @@ if(!empty($_collection)) { $_sdata[0] = array( 'colName' => $_fd[$_fid]['identifier'], 'colValue' => $_fv, - 'fieldData' => $_fd[$_fid] + 'fieldData' => $_fd[$_fid], + 'exactTagMatch' => true ); $_search = $_fv; $TemplateData['pagination']['currentGetParameters']['fid'] = $_fid;