Fix inbody:searchterm advanced query syntax - fixes #210 (thanks to @SeanFromIT for the report)

This commit is contained in:
Starbeamrainbowlabs 2020-08-19 16:59:54 +01:00
parent 97f3e88a94
commit 9fad95035b
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
2 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,10 @@
# Changelog # Changelog
This file holds the changelog for Pepperminty Wiki. This is the master list of things that have changed (second only to the commit history!) - though the information for any particular release can also be found in the description of it's page for every release made on GitHub too. This file holds the changelog for Pepperminty Wiki. This is the master list of things that have changed (second only to the commit history!) - though the information for any particular release can also be found in the description of it's page for every release made on GitHub too.
## v0.22-dev (unreleased)
### Fixed
- Fixed `inbody:searchterm` advanced query syntax
## v0.22-beta2 ## v0.22-beta2

View File

@ -1,7 +1,7 @@
<?php <?php
register_module([ register_module([
"name" => "Library: Search engine", "name" => "Library: Search engine",
"version" => "0.13.1", "version" => "0.13.2",
"author" => "Starbeamrainbowlabs", "author" => "Starbeamrainbowlabs",
"description" => "A library module that provides the backend to the search engine module.", "description" => "A library module that provides the backend to the search engine module.",
"id" => "lib-search-engine", "id" => "lib-search-engine",
@ -784,7 +784,7 @@ class search
if($term_def["weight"] == -1) if($term_def["weight"] == -1)
continue; // Skip stop words continue; // Skip stop words
if(!in_array($term_def["location"], ["all", "inbody"])) if(!in_array($term_def["location"], ["all", "body"]))
continue; // Skip terms we shouldn't search the page body for continue; // Skip terms we shouldn't search the page body for
if(!self::$invindex->has($term_def["term"])) if(!self::$invindex->has($term_def["term"]))