summaryrefslogtreecommitdiff
path: root/list_components.php
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-05-27 20:26:16 +0100
committerLester Caine <lester@lsces.co.uk>2026-05-27 20:26:16 +0100
commitdb476a2a58c3eab7ea401342daecdd1411dec4cf (patch)
tree6e9b446dd00e501b72a4d94dbdffdc423e212863 /list_components.php
parentdb468dcfc4cbd961d422a66283d1832dd1c01b71 (diff)
downloadstock-db476a2a58c3eab7ea401342daecdd1411dec4cf.tar.gz
stock-db476a2a58c3eab7ea401342daecdd1411dec4cf.tar.bz2
stock-db476a2a58c3eab7ea401342daecdd1411dec4cf.zip
Wire minifind search box on component list; search title and description
list_components.php: map $_REQUEST['find'] (minifind field name) to 'search' before calling getList(). StockComponent::getList(): extend search WHERE to match both lc.title and lc.data so e.g. "ResCF" finds all Carbon Film Resistors by description prefix. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'list_components.php')
-rw-r--r--list_components.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/list_components.php b/list_components.php
index 4e5c9cf..035da3d 100644
--- a/list_components.php
+++ b/list_components.php
@@ -18,6 +18,10 @@ if( !empty( $_REQUEST['user_id'] ) && is_numeric( $_REQUEST['user_id'] ) ) {
$gBitSmarty->assign( 'gQueryUserId', $_REQUEST['user_id'] );
}
+if( !empty( $_REQUEST['find'] ) ) {
+ $_REQUEST['search'] = $_REQUEST['find'];
+}
+
$componentList = $component->getList( $_REQUEST );
$component->invokeServices( 'content_list_function', $_REQUEST );
$gBitSmarty->assign( 'listInfo', $_REQUEST['listInfo'] );