From: Banana Date: Sat, 3 Feb 2024 19:13:47 +0000 (+0100) Subject: some code cleanups X-Git-Tag: 1.6~3 X-Git-Url: http://91.132.146.200/gitweb/?a=commitdiff_plain;h=db4a693a43bc09e8fea5a9a17d15c73e8bd23c3a;p=bibliotheca-php.git some code cleanups --- diff --git a/webclient/lib/managecollections.class.php b/webclient/lib/managecollections.class.php index cd1b7ab..bb12041 100644 --- a/webclient/lib/managecollections.class.php +++ b/webclient/lib/managecollections.class.php @@ -461,7 +461,7 @@ class ManageCollections { $_fieldAvailable = true; continue; } - if(isset($v['searchtype']) && strpos($v['searchtype'],'Text') !== false) { + if(isset($v['searchtype']) && str_contains($v['searchtype'], 'Text')) { $dataFields[$k] = $v['identifier']; } } diff --git a/webclient/lib/manageentry.class.php b/webclient/lib/manageentry.class.php index b219fd3..7ab6afa 100644 --- a/webclient/lib/manageentry.class.php +++ b/webclient/lib/manageentry.class.php @@ -629,7 +629,7 @@ class Manageentry { private function _saveField_hidden__combSearch(array $data, array $queryData, array $allInputData): array { $searchData = ''; foreach($allInputData as $f=>$_d) { - if(isset($_d['searchtype']) && strpos($_d['searchtype'],'Text') !== false) { + if(isset($_d['searchtype']) && str_contains($_d['searchtype'], 'Text')) { $searchData .= " ".$_d['valueToSave']; } }