1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-25 05:22:59 +00:00

Fix inverted logic in libstoragebox

This commit is contained in:
Starbeamrainbowlabs 2020-03-15 22:04:18 +00:00
parent 5232bb3060
commit b8f37597a6
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
2 changed files with 2 additions and 2 deletions

View file

@ -278,7 +278,7 @@ class search
if($capture_offsets) if($capture_offsets)
$flags |= PREG_SPLIT_OFFSET_CAPTURE; $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 = self::$literator->transliterate($source);
$source = preg_replace('/[\[\]\|\{\}\/]/u', " ", $source); $source = preg_replace('/[\[\]\|\{\}\/]/u', " ", $source);
return preg_split("/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))|\|/u", $source, -1, $flags); return preg_split("/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))|\|/u", $source, -1, $flags);

View file

@ -91,7 +91,7 @@ class StorageBox {
*/ */
public function get_keys(string $exclude) : \PDOStatement { public function get_keys(string $exclude) : \PDOStatement {
return $this->query( return $this->query(
"SELECT key FROM store WHERE key LIKE :containing;", "SELECT key FROM store WHERE key NOT LIKE :containing;",
[ "containing" => "%$exclude%" ] [ "containing" => "%$exclude%" ]
); );
} }