diff options
author | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
---|---|---|
committer | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
commit | b16abc8166c29585cb76cc55c3bdd76e5833cb4f (patch) | |
tree | 6a34f465a74b7a3a6dc00a3d7aa8dcc25ac3e3a5 /OpenSim/Addons/Groups/Service | |
parent | Make it possible to disable the bakes module in the way it is described in co... (diff) | |
download | opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.zip opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.gz opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.bz2 opensim-SC_OLD-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.xz |
Massive tab and trailing space cleanup
Diffstat (limited to 'OpenSim/Addons/Groups/Service')
-rw-r--r-- | OpenSim/Addons/Groups/Service/GroupsService.cs | 38 | ||||
-rw-r--r-- | OpenSim/Addons/Groups/Service/GroupsServiceBase.cs | 110 | ||||
-rw-r--r-- | OpenSim/Addons/Groups/Service/HGGroupsService.cs | 2 |
3 files changed, 75 insertions, 75 deletions
diff --git a/OpenSim/Addons/Groups/Service/GroupsService.cs b/OpenSim/Addons/Groups/Service/GroupsService.cs index 710b00a..ea0fedd 100644 --- a/OpenSim/Addons/Groups/Service/GroupsService.cs +++ b/OpenSim/Addons/Groups/Service/GroupsService.cs | |||
@@ -126,7 +126,7 @@ namespace OpenSim.Groups | |||
126 | 126 | ||
127 | #endregion | 127 | #endregion |
128 | 128 | ||
129 | public UUID CreateGroup(string RequestingAgentID, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, | 129 | public UUID CreateGroup(string RequestingAgentID, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, |
130 | bool allowPublish, bool maturePublish, UUID founderID, out string reason) | 130 | bool allowPublish, bool maturePublish, UUID founderID, out string reason) |
131 | { | 131 | { |
132 | reason = string.Empty; | 132 | reason = string.Empty; |
@@ -264,7 +264,7 @@ namespace OpenSim.Groups | |||
264 | if (ownerRole != null) | 264 | if (ownerRole != null) |
265 | ownerRoleID = ownerRole.RoleID; | 265 | ownerRoleID = ownerRole.RoleID; |
266 | 266 | ||
267 | // Check visibility? | 267 | // Check visibility? |
268 | // When we don't want to check visibility, we pass it "all" as the requestingAgentID | 268 | // When we don't want to check visibility, we pass it "all" as the requestingAgentID |
269 | bool checkVisibility = !RequestingAgentID.Equals(UUID.Zero.ToString()); | 269 | bool checkVisibility = !RequestingAgentID.Equals(UUID.Zero.ToString()); |
270 | 270 | ||
@@ -307,20 +307,20 @@ namespace OpenSim.Groups | |||
307 | m.Contribution = Int32.Parse(d.Data["Contribution"]); | 307 | m.Contribution = Int32.Parse(d.Data["Contribution"]); |
308 | m.ListInProfile = d.Data["ListInProfile"] == "1" ? true : false; | 308 | m.ListInProfile = d.Data["ListInProfile"] == "1" ? true : false; |
309 | 309 | ||
310 | GridUserData gud = m_GridUserService.Get(d.PrincipalID); | 310 | GridUserData gud = m_GridUserService.Get(d.PrincipalID); |
311 | if (gud != null) | 311 | if (gud != null) |
312 | { | 312 | { |
313 | if (bool.Parse(gud.Data["Online"])) | 313 | if (bool.Parse(gud.Data["Online"])) |
314 | { | 314 | { |
315 | m.OnlineStatus = @"Online"; | 315 | m.OnlineStatus = @"Online"; |
316 | } | 316 | } |
317 | else | 317 | else |
318 | { | 318 | { |
319 | int unixtime = int.Parse(gud.Data["Login"]); | 319 | int unixtime = int.Parse(gud.Data["Login"]); |
320 | // The viewer is very picky about how these strings are formed. Eg. it will crash on malformed dates! | 320 | // The viewer is very picky about how these strings are formed. Eg. it will crash on malformed dates! |
321 | m.OnlineStatus = (unixtime == 0) ? @"unknown" : Util.ToDateTime(unixtime).ToString("MM/dd/yyyy"); | 321 | m.OnlineStatus = (unixtime == 0) ? @"unknown" : Util.ToDateTime(unixtime).ToString("MM/dd/yyyy"); |
322 | } | 322 | } |
323 | } | 323 | } |
324 | 324 | ||
325 | // Is this person an owner of the group? | 325 | // Is this person an owner of the group? |
326 | m.IsOwner = (rolemembershipsList.Find(r => r.RoleID == ownerRoleID) != null) ? true : false; | 326 | m.IsOwner = (rolemembershipsList.Find(r => r.RoleID == ownerRoleID) != null) ? true : false; |
@@ -553,8 +553,8 @@ namespace OpenSim.Groups | |||
553 | { | 553 | { |
554 | newRoleID = r.RoleID; | 554 | newRoleID = r.RoleID; |
555 | break; | 555 | break; |
556 | } | 556 | } |
557 | } | 557 | } |
558 | 558 | ||
559 | MembershipData member = m_Database.RetrieveMember(GroupID, AgentID); | 559 | MembershipData member = m_Database.RetrieveMember(GroupID, AgentID); |
560 | if (member != null) | 560 | if (member != null) |
@@ -712,7 +712,7 @@ namespace OpenSim.Groups | |||
712 | m_Database.StoreMember(membership); | 712 | m_Database.StoreMember(membership); |
713 | } | 713 | } |
714 | 714 | ||
715 | public bool AddGroupNotice(string RequestingAgentID, UUID groupID, UUID noticeID, string fromName, string subject, string message, | 715 | public bool AddGroupNotice(string RequestingAgentID, UUID groupID, UUID noticeID, string fromName, string subject, string message, |
716 | bool hasAttachment, byte attType, string attName, UUID attItemID, string attOwnerID) | 716 | bool hasAttachment, byte attType, string attName, UUID attItemID, string attOwnerID) |
717 | { | 717 | { |
718 | // Check perms | 718 | // Check perms |
diff --git a/OpenSim/Addons/Groups/Service/GroupsServiceBase.cs b/OpenSim/Addons/Groups/Service/GroupsServiceBase.cs index 8e237aa..98d0172 100644 --- a/OpenSim/Addons/Groups/Service/GroupsServiceBase.cs +++ b/OpenSim/Addons/Groups/Service/GroupsServiceBase.cs | |||
@@ -35,67 +35,67 @@ using OpenSim.Services.Base; | |||
35 | 35 | ||
36 | namespace OpenSim.Groups | 36 | namespace OpenSim.Groups |
37 | { | 37 | { |
38 | public class GroupsServiceBase : ServiceBase | 38 | public class GroupsServiceBase : ServiceBase |
39 | { | 39 | { |
40 | protected IGroupsData m_Database = null; | 40 | protected IGroupsData m_Database = null; |
41 | protected IGridUserData m_GridUserService = null; | 41 | protected IGridUserData m_GridUserService = null; |
42 | 42 | ||
43 | public GroupsServiceBase(IConfigSource config, string cName) | 43 | public GroupsServiceBase(IConfigSource config, string cName) |
44 | : base(config) | 44 | : base(config) |
45 | { | 45 | { |
46 | string dllName = String.Empty; | 46 | string dllName = String.Empty; |
47 | string connString = String.Empty; | 47 | string connString = String.Empty; |
48 | string realm = "os_groups"; | 48 | string realm = "os_groups"; |
49 | string usersRealm = "GridUser"; | 49 | string usersRealm = "GridUser"; |
50 | string configName = (cName == string.Empty) ? "Groups" : cName; | 50 | string configName = (cName == string.Empty) ? "Groups" : cName; |
51 | 51 | ||
52 | // | 52 | // |
53 | // Try reading the [DatabaseService] section, if it exists | 53 | // Try reading the [DatabaseService] section, if it exists |
54 | // | 54 | // |
55 | IConfig dbConfig = config.Configs["DatabaseService"]; | 55 | IConfig dbConfig = config.Configs["DatabaseService"]; |
56 | if (dbConfig != null) | 56 | if (dbConfig != null) |
57 | { | 57 | { |
58 | if (dllName == String.Empty) | 58 | if (dllName == String.Empty) |
59 | dllName = dbConfig.GetString("StorageProvider", String.Empty); | 59 | dllName = dbConfig.GetString("StorageProvider", String.Empty); |
60 | if (connString == String.Empty) | 60 | if (connString == String.Empty) |
61 | connString = dbConfig.GetString("ConnectionString", String.Empty); | 61 | connString = dbConfig.GetString("ConnectionString", String.Empty); |
62 | } | 62 | } |
63 | 63 | ||
64 | // | 64 | // |
65 | // [Groups] section overrides [DatabaseService], if it exists | 65 | // [Groups] section overrides [DatabaseService], if it exists |
66 | // | 66 | // |
67 | IConfig groupsConfig = config.Configs[configName]; | 67 | IConfig groupsConfig = config.Configs[configName]; |
68 | if (groupsConfig != null) | 68 | if (groupsConfig != null) |
69 | { | 69 | { |
70 | dllName = groupsConfig.GetString("StorageProvider", dllName); | 70 | dllName = groupsConfig.GetString("StorageProvider", dllName); |
71 | connString = groupsConfig.GetString("ConnectionString", connString); | 71 | connString = groupsConfig.GetString("ConnectionString", connString); |
72 | realm = groupsConfig.GetString("Realm", realm); | 72 | realm = groupsConfig.GetString("Realm", realm); |
73 | } | 73 | } |
74 | 74 | ||
75 | // | 75 | // |
76 | // We tried, but this doesn't exist. We can't proceed. | 76 | // We tried, but this doesn't exist. We can't proceed. |
77 | // | 77 | // |
78 | if (dllName.Equals(String.Empty)) | 78 | if (dllName.Equals(String.Empty)) |
79 | throw new Exception("No StorageProvider configured"); | 79 | throw new Exception("No StorageProvider configured"); |
80 | 80 | ||
81 | m_Database = LoadPlugin<IGroupsData>(dllName, new Object[] { connString, realm }); | 81 | m_Database = LoadPlugin<IGroupsData>(dllName, new Object[] { connString, realm }); |
82 | if (m_Database == null) | 82 | if (m_Database == null) |
83 | throw new Exception("Could not find a storage interface in the given module " + dllName); | 83 | throw new Exception("Could not find a storage interface in the given module " + dllName); |
84 | 84 | ||
85 | // | 85 | // |
86 | // [GridUserService] section overrides [DatabaseService], if it exists | 86 | // [GridUserService] section overrides [DatabaseService], if it exists |
87 | // | 87 | // |
88 | IConfig usersConfig = config.Configs["GridUserService"]; | 88 | IConfig usersConfig = config.Configs["GridUserService"]; |
89 | if (usersConfig != null) | 89 | if (usersConfig != null) |
90 | { | 90 | { |
91 | dllName = usersConfig.GetString("StorageProvider", dllName); | 91 | dllName = usersConfig.GetString("StorageProvider", dllName); |
92 | connString = usersConfig.GetString("ConnectionString", connString); | 92 | connString = usersConfig.GetString("ConnectionString", connString); |
93 | usersRealm = usersConfig.GetString("Realm", usersRealm); | 93 | usersRealm = usersConfig.GetString("Realm", usersRealm); |
94 | } | 94 | } |
95 | 95 | ||
96 | m_GridUserService = LoadPlugin<IGridUserData>(dllName, new Object[] { connString, usersRealm }); | 96 | m_GridUserService = LoadPlugin<IGridUserData>(dllName, new Object[] { connString, usersRealm }); |
97 | if (m_GridUserService == null) | 97 | if (m_GridUserService == null) |
98 | throw new Exception("Could not find a storage inferface for the given users module " + dllName); | 98 | throw new Exception("Could not find a storage inferface for the given users module " + dllName); |
99 | } | 99 | } |
100 | } | 100 | } |
101 | } | 101 | } |
diff --git a/OpenSim/Addons/Groups/Service/HGGroupsService.cs b/OpenSim/Addons/Groups/Service/HGGroupsService.cs index 56e999b..7d86f85 100644 --- a/OpenSim/Addons/Groups/Service/HGGroupsService.cs +++ b/OpenSim/Addons/Groups/Service/HGGroupsService.cs | |||
@@ -76,7 +76,7 @@ namespace OpenSim.Groups | |||
76 | 76 | ||
77 | // Check if it already exists | 77 | // Check if it already exists |
78 | GroupData grec = m_Database.RetrieveGroup(groupID); | 78 | GroupData grec = m_Database.RetrieveGroup(groupID); |
79 | if (grec == null || | 79 | if (grec == null || |
80 | (grec != null && grec.Data["Location"] != string.Empty && grec.Data["Location"].ToLower() != serviceLocation.ToLower())) | 80 | (grec != null && grec.Data["Location"] != string.Empty && grec.Data["Location"].ToLower() != serviceLocation.ToLower())) |
81 | { | 81 | { |
82 | // Create the group | 82 | // Create the group |