groups v2: remove wrong filters on DB search

0.9.1.0-post-fixes
UbitUmarov 2019-10-13 18:52:33 +01:00
parent 0273baaef6
commit 5bbaea50e4
2 changed files with 3 additions and 3 deletions

View File

@ -90,7 +90,7 @@ namespace OpenSim.Data.MySQL
else
pattern = string.Format("Name LIKE '%{0}%'", MySqlHelper.EscapeString(pattern));
return m_Groups.Get(string.Format("ShowInList=1 AND ({0}) ORDER BY Name LIMIT 100", pattern));
return m_Groups.Get(string.Format("ShowInList=1 AND ({0})", pattern));
}
public bool DeleteGroup(UUID groupID)

View File

@ -86,13 +86,13 @@ namespace OpenSim.Data.PGSQL
if (string.IsNullOrEmpty(pattern)) // True for where clause
{
pattern = " 1 ORDER BY lower(\"Name\") LIMIT 100";
pattern = "1";
return m_Groups.Get(pattern);
}
else
{
pattern = " \"ShowInList\" = 1 AND lower(\"Name\") LIKE lower('%" + pattern + "%') ORDER BY lower(\"Name\") LIMIT 100";
pattern = " \"ShowInList\" = 1 AND lower(\"Name\") LIKE lower('%" + pattern + "%')";
return m_Groups.Get(pattern, new NpgsqlParameter("pattern", pattern));
}