From: Banana Date: Fri, 16 Dec 2022 17:41:35 +0000 (+0100) Subject: fixing #13 X-Git-Tag: v1.4~14 X-Git-Url: http://91.132.146.200/gitweb/?a=commitdiff_plain;h=2c77f51c62262038e1ef249c3a31118ae55861e9;p=bibliotheca-php.git fixing #13 --- diff --git a/webclient/lib/mancubus.class.php b/webclient/lib/mancubus.class.php index 9ddb5be..472e44d 100644 --- a/webclient/lib/mancubus.class.php +++ b/webclient/lib/mancubus.class.php @@ -146,18 +146,25 @@ class Mancubus { $_colObj = new Trite($this->_DB,$this->_User); $_colObj->load($result['id']); $_fd = $_colObj->getCollectionFields(); - - $result['entries'] = $_mObj->getEntries( - array( - 0 => array( - 'colName' => $_colObj->param('defaultSearchField'), - 'colValue' => $search, - 'fieldData' => $_fd[$_colObj->param('defaultSearchField')] + $_defSearchField = $_colObj->param('defaultSearchField'); + + if(!empty($_defSearchField)) { + $result['entries'] = $_mObj->getEntries( + array( + 0 => array( + 'colName' => $_defSearchField, + 'colValue' => $search, + 'fieldData' => $_fd[$_defSearchField] + ) ) - ) - ); + ); + } + else { + error_log("[WARN] ".__METHOD__." missing default search field for collectionid: ".$result['id']); + } } else { + $result['entries'] = $_mObj->getEntries(); } $ret[$result['id']] = $result;