add support for double quotes in the search string
authorDenis Ovsienko <denis@ovsienko.info>
Tue, 6 Dec 2016 16:28:36 +0000 (16:28 +0000)
committerDenis Ovsienko <denis@ovsienko.info>
Tue, 6 Dec 2016 16:28:36 +0000 (16:28 +0000)
commite79cccab070de7eed09575fed6358d379f9d0765
tree2a53f3dd98b4df793471df9b712fdd6291473eee
parent89ee9a1c9b13a9ede1448af6e939377ccb5381b3
add support for double quotes in the search string

Make it possible to search for substrings that include space(s), for
example, searching for "mail server" (with the quotes) will no longer
return those records that contain only "mail" or only "server" or "mail
backup server". However, the query will still match "e-mail server" as
before. Add some tests.

* parseSearchTerms(): a new function to implement the syntax more
  complex than possible with just explode()
* getSearchResultByField(): use the above
* searchHandler(): ditto
ChangeLog
tests/PureFunctionTest.php
wwwroot/inc/database.php
wwwroot/inc/functions.php
wwwroot/inc/interface.php