From 548614ead145e0080eeded3efc4e3f061d756723 Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 20 Feb 2024 19:15:53 +0200 Subject: [PATCH] fix namespace detection --- src/server.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/server.php b/src/server.php index 07b74a6..09463c9 100644 --- a/src/server.php +++ b/src/server.php @@ -135,6 +135,16 @@ $server->setHandler( $namespace = $ns[1]; } + if ($namespace) + { + $filter = + [ + 'crc32_namespace' => crc32( + $namespace + ) + ]; + } + // Build header if ($search) { @@ -235,16 +245,6 @@ $server->setHandler( } // Get records - if ($namespace) - { - $filter = - [ - 'crc32_namespace' => crc32( - $namespace - ) - ]; - } - $records = $index->get( $search, $filter,