diff options
author | UbitUmarov | 2019-10-13 19:11:21 +0100 |
---|---|---|
committer | UbitUmarov | 2019-10-13 19:11:21 +0100 |
commit | 6d1ad6acd5cd79b29bc0253aaa16cf940eea9658 (patch) | |
tree | 4d18fbd64980fcafae10376f081d8d1b3817fada /OpenSim/Region/CoreModules/Framework/Search | |
parent | groups v2: remove wrong filters on DB search (diff) | |
download | opensim-SC-6d1ad6acd5cd79b29bc0253aaa16cf940eea9658.zip opensim-SC-6d1ad6acd5cd79b29bc0253aaa16cf940eea9658.tar.gz opensim-SC-6d1ad6acd5cd79b29bc0253aaa16cf940eea9658.tar.bz2 opensim-SC-6d1ad6acd5cd79b29bc0253aaa16cf940eea9658.tar.xz |
viewers group search page size is 100 ( and not way to detect other value, so hardwired)
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/Search')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/Search/BasicSearchModule.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/Search/BasicSearchModule.cs b/OpenSim/Region/CoreModules/Framework/Search/BasicSearchModule.cs index 1026eae..8a44ba4 100644 --- a/OpenSim/Region/CoreModules/Framework/Search/BasicSearchModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Search/BasicSearchModule.cs | |||
@@ -193,7 +193,7 @@ namespace OpenSim.Region.CoreModules.Framework.Search | |||
193 | return; | 193 | return; |
194 | } | 194 | } |
195 | 195 | ||
196 | // filter out groups with no members | 196 | // filter out groups |
197 | DirGroupsReplyData[] result = new DirGroupsReplyData[answer.Count]; | 197 | DirGroupsReplyData[] result = new DirGroupsReplyData[answer.Count]; |
198 | int count = 0; | 198 | int count = 0; |
199 | foreach(DirGroupsReplyData dgrd in answer) | 199 | foreach(DirGroupsReplyData dgrd in answer) |
@@ -207,10 +207,18 @@ namespace OpenSim.Region.CoreModules.Framework.Search | |||
207 | if ((queryStart > 0) && (queryStart < count)) | 207 | if ((queryStart > 0) && (queryStart < count)) |
208 | { | 208 | { |
209 | int len = count - queryStart; | 209 | int len = count - queryStart; |
210 | if (len > 101) // a viewer page is 100 | ||
211 | len = 101; | ||
210 | DirGroupsReplyData[] tmp = new DirGroupsReplyData[len]; | 212 | DirGroupsReplyData[] tmp = new DirGroupsReplyData[len]; |
211 | Array.Copy(result, queryStart, tmp, 0, len); | 213 | Array.Copy(result, queryStart, tmp, 0, len); |
212 | result = tmp; | 214 | result = tmp; |
213 | } | 215 | } |
216 | else if (count > 101) | ||
217 | { | ||
218 | DirGroupsReplyData[] tmp = new DirGroupsReplyData[101]; | ||
219 | Array.Copy(result, 0, tmp, 0, 101); | ||
220 | result = tmp; | ||
221 | } | ||
214 | 222 | ||
215 | // TODO: This currently ignores pretty much all the query flags including Mature and sort order | 223 | // TODO: This currently ignores pretty much all the query flags including Mature and sort order |
216 | remoteClient.SendDirGroupsReply(queryID, result); | 224 | remoteClient.SendDirGroupsReply(queryID, result); |