From 78e416960ffd82e5faa88dbc18c04c07821c0fa6 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Fri, 5 Jan 2018 23:28:49 +0100 Subject: [PATCH] Fixed more warnings --- Logic/Cache/OrganizationCache.cs | 2 - .../Communications/PhoneMessageTransmitter.cs | 5 +-- .../GeographyWithPeopleDataObject.cs | 41 ------------------- Logic/Logic.csproj | 1 - 4 files changed, 1 insertion(+), 48 deletions(-) delete mode 100644 Logic/DataObjects/GeographyWithPeopleDataObject.cs diff --git a/Logic/Cache/OrganizationCache.cs b/Logic/Cache/OrganizationCache.cs index 5390c41a..17374f2d 100644 --- a/Logic/Cache/OrganizationCache.cs +++ b/Logic/Cache/OrganizationCache.cs @@ -178,7 +178,6 @@ namespace Swarmops.Logic.Cache List result = new List(); //Prime the cache - BasicOrganization start = GetOrganization (startOrganizationId); List thisList = organizations[startOrganizationId]; @@ -219,7 +218,6 @@ namespace Swarmops.Logic.Cache List result = new List(); lock (loadCacheLock) { - BasicOrganization parent = GetOrganization (parentOrgId); //TODO: It is possible to miss a child here if that child was added after the last cache load. Dictionary> hashedOrganizations = GetHashedOrganizations(); diff --git a/Logic/Communications/PhoneMessageTransmitter.cs b/Logic/Communications/PhoneMessageTransmitter.cs index b75480a5..900d752b 100644 --- a/Logic/Communications/PhoneMessageTransmitter.cs +++ b/Logic/Communications/PhoneMessageTransmitter.cs @@ -82,16 +82,13 @@ namespace Swarmops.Logic.Communications case "SwedishKannel": { - String username = Credential.Login; - String password = Credential.Password; Encoding enc = Credential.Encoding; String url = "https://nurse.sanitarium.se/kannel/status"; - String result; HttpWebResponse responseOut = null; try { - result = HTTPSender.Send (url, enc, 1500, out responseOut); + HTTPSender.Send (url, enc, 1500, out responseOut); if (((int) responseOut.StatusCode).ToString().StartsWith ("2")) return true; return false; diff --git a/Logic/DataObjects/GeographyWithPeopleDataObject.cs b/Logic/DataObjects/GeographyWithPeopleDataObject.cs deleted file mode 100644 index 35a7b901..00000000 --- a/Logic/DataObjects/GeographyWithPeopleDataObject.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System.Collections.Generic; -using System.ComponentModel; -using Swarmops.Database; -using Swarmops.Logic.Structure; - -namespace Swarmops.Logic.DataObjects -{ -#if !__MonoCS__ - [DataObject (true)] -#endif - public class GeographyWithPeopleDataObject - { -#if !__MonoCS__ - [DataObjectMethod (DataObjectMethodType.Select)] -#endif - public static GeographyWithPeople[] SelectSortedStatic (int orgId) - { - Organizations orgs = Organization.FromIdentity (orgId).ThisAndBelow(); - - List resList = new List(); - Geographies tree = Geography.Root.ThisAndBelow(); - foreach (Geography geo in tree) - { - GeographyWithPeople row = new GeographyWithPeople(); - row.GeographyID = geo.Identity; - row.Name = geo.Name; - row.ActivistCount = 0; - row.MemberCount = 0; - row.LeadContent = ""; - row.SecondsContent = ""; - row.OrgId = orgId; - Geographies gTree = geo.ThisAndBelow(); - int[] members = SwarmDb.GetDatabaseForReading() - .GetParticipantsForOrganizationsAndGeographies (orgs.Identities, gTree.Identities); - } - - - return resList.ToArray(); - } - } -} \ No newline at end of file diff --git a/Logic/Logic.csproj b/Logic/Logic.csproj index a47755e0..b76f236f 100644 --- a/Logic/Logic.csproj +++ b/Logic/Logic.csproj @@ -277,7 +277,6 @@ -