From b8f37597a6e855d93166283e2fba43cbbbee41f3 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Sun, 15 Mar 2020 22:04:18 +0000 Subject: [PATCH] Fix inverted logic in libstoragebox --- modules/lib-search-engine.php | 2 +- modules/lib-storage-box.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/lib-search-engine.php b/modules/lib-search-engine.php index 7a730d7..a2a8206 100644 --- a/modules/lib-search-engine.php +++ b/modules/lib-search-engine.php @@ -278,7 +278,7 @@ class search if($capture_offsets) $flags |= PREG_SPLIT_OFFSET_CAPTURE; - // We don't need to normalise here because the transliterator handles + // We don't need to normalise here because the transliterator handles that $source = self::$literator->transliterate($source); $source = preg_replace('/[\[\]\|\{\}\/]/u', " ", $source); return preg_split("/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))|\|/u", $source, -1, $flags); diff --git a/modules/lib-storage-box.php b/modules/lib-storage-box.php index f9906dc..53e4d39 100644 --- a/modules/lib-storage-box.php +++ b/modules/lib-storage-box.php @@ -91,7 +91,7 @@ class StorageBox { */ public function get_keys(string $exclude) : \PDOStatement { return $this->query( - "SELECT key FROM store WHERE key LIKE :containing;", + "SELECT key FROM store WHERE key NOT LIKE :containing;", [ "containing" => "%$exclude%" ] ); }