Fixed incorrectly escaped * in wildcard search for postgres

This commit is contained in:
hmhealey
2015-10-19 15:30:43 -04:00
parent 06fd374c19
commit 995c5a276b

View File

@@ -440,7 +440,7 @@ func (s SqlPostStore) Search(teamId string, userId string, params *model.SearchP
if utils.Cfg.SqlSettings.DriverName == model.DATABASE_DRIVER_POSTGRES {
// Parse text for wildcards
if wildcard, err := regexp.Compile("\\*($| )"); err == nil {
terms = wildcard.ReplaceAllLiteralString(terms, ":* ")
terms = wildcard.ReplaceAllLiteralString(terms, "* ")
}
}