diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2013-05-31 14:36:27 +0200 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2013-05-31 14:36:27 +0200 |
| commit | c530117f099bb4bd6bd9e7ac698d737a3f0a0104 (patch) | |
| tree | d8dc14ceb8a5b89a0f49e08668ce52b8358466d2 | |
| parent | 1620afb49182905e4142ceb8d13c4cab8c1f83cd (diff) | |
| parent | aad2f5416894facb12f5003b58f92514b9b89567 (diff) | |
| download | cgeo-c530117f099bb4bd6bd9e7ac698d737a3f0a0104.zip cgeo-c530117f099bb4bd6bd9e7ac698d737a3f0a0104.tar.gz cgeo-c530117f099bb4bd6bd9e7ac698d737a3f0a0104.tar.bz2 | |
Merge remote-tracking branch 'origin/release'
| -rw-r--r-- | main/res/values/strings_not_translatable.xml | 4 | ||||
| -rw-r--r-- | main/src/cgeo/geocaching/connector/gc/GCConstants.java | 4 | ||||
| -rw-r--r-- | main/src/cgeo/geocaching/connector/gc/GCParser.java | 11 | ||||
| -rw-r--r-- | tests/src/cgeo/geocaching/cgeoApplicationTest.java | 2 | ||||
| -rw-r--r-- | tests/src/cgeo/test/Compare.java | 2 |
5 files changed, 13 insertions, 10 deletions
diff --git a/main/res/values/strings_not_translatable.xml b/main/res/values/strings_not_translatable.xml index 8899805..93fd87e 100644 --- a/main/res/values/strings_not_translatable.xml +++ b/main/res/values/strings_not_translatable.xml @@ -96,9 +96,11 @@ <!-- changelog -->
<string name="changelog" translatable="false">\n
- <b>Next bugfix release</b>\n
+ <b>2013.05.31</b>\n
<b>Bugfixing:</b>\n
+ · Adaption to changes on gc.com (cache log not possible, cache attributes not shown)\n
· Pictures in logs are now loaded in standard resolution like on the website to improve performance\n
+ · Corrected missing information and performance issues on nearby search for basic members\n
\n
\n
<b>2013.05.22</b>\n
diff --git a/main/src/cgeo/geocaching/connector/gc/GCConstants.java b/main/src/cgeo/geocaching/connector/gc/GCConstants.java index c032c34..b4f5845 100644 --- a/main/src/cgeo/geocaching/connector/gc/GCConstants.java +++ b/main/src/cgeo/geocaching/connector/gc/GCConstants.java @@ -44,7 +44,7 @@ public final class GCConstants { public final static Pattern PATTERN_FOUND = Pattern.compile("<a id=\"ctl00_ContentBody_hlFoundItLog\"[^<]*<img src=\"[^\"]+check\\.\\w+\"[^>]*>[^<]*</a>[^<]*</p>"); public final static Pattern PATTERN_FOUND_ALTERNATIVE = Pattern.compile("<div class=\"StatusInformationWidget FavoriteWidget\""); public final static Pattern PATTERN_FOUND_DATE = Pattern.compile("You logged this as Found on ([^.]+?)\\.[^<]*</a>[^<]*</p>"); - public final static Pattern PATTERN_OWNER_DISPLAYNAME = Pattern.compile("<div id=\"ctl00_ContentBody_mcd1\">[^<]+<a href=\"[^\"]+\">([^<]+)</a></div>"); + public final static Pattern PATTERN_OWNER_DISPLAYNAME = Pattern.compile("<div id=\"ctl00_ContentBody_mcd1\">[^<]+<a href=\"[^\"]+\">([^<]+)</a>"); public final static Pattern PATTERN_TYPE = Pattern.compile("<img src=\"[^\"]*/WptTypes/\\d+\\.gif\" alt=\"([^\"]+?)\"[^>]*>"); public final static Pattern PATTERN_HIDDEN = Pattern.compile("<div id=\"ctl00_ContentBody_mcd2\">\\W*Hidden[\\s:]*([^<]+?)</div>"); public final static Pattern PATTERN_HIDDENEVENT = Pattern.compile("Event\\s*Date\\s*:\\s*([^<]+)<div id=\"calLinks\">", Pattern.DOTALL); @@ -55,7 +55,7 @@ public final class GCConstants { /** Two groups ! */ public final static Pattern PATTERN_COUNTLOG = Pattern.compile("<img src=\"/images/logtypes/([0-9]+)\\.png\"[^>]+> (\\d*[,.]?\\d+)"); public static final Pattern PATTERN_PREMIUMMEMBERS = Pattern.compile("<p class=\"Warning NoBottomSpacing\">This is a Premium Member Only cache.</p>"); - public final static Pattern PATTERN_ATTRIBUTES = Pattern.compile("<h3 class=\"WidgetHeader\">.+?Attributes</h3>[^<]*<div class=\"WidgetBody\">((?:[^<]*<img src=\"[^\"]+\" alt=\"[^\"]+\"[^>]*>)+?)[^<]*<p"); + public final static Pattern PATTERN_ATTRIBUTES = Pattern.compile("Attributes\\s*</h3>[^<]*<div class=\"WidgetBody\">((?:[^<]*<img src=\"[^\"]+\" alt=\"[^\"]+\"[^>]*>)+?)[^<]*<p"); /** Two groups ! */ public final static Pattern PATTERN_ATTRIBUTESINSIDE = Pattern.compile("[^<]*<img src=\"([^\"]+)\" alt=\"([^\"]+?)\""); public final static Pattern PATTERN_SPOILER_IMAGE = Pattern.compile("<a href=\"(http://img\\.geocaching\\.com/cache/[^.]+\\.(jpg|jpeg|png|gif))\"[^>]+><img[^>]+><span>([^<]+)</span></a>(?:<br />([^<]+)<br /><br />)?"); diff --git a/main/src/cgeo/geocaching/connector/gc/GCParser.java b/main/src/cgeo/geocaching/connector/gc/GCParser.java index 6d9f4ed..306f45a 100644 --- a/main/src/cgeo/geocaching/connector/gc/GCParser.java +++ b/main/src/cgeo/geocaching/connector/gc/GCParser.java @@ -975,12 +975,13 @@ public abstract class GCParser { "__EVENTARGUMENT", "", "__LASTFOCUS", "", "ctl00$ContentBody$LogBookPanel1$ddLogType", Integer.toString(logType.id), - "ctl00$ContentBody$LogBookPanel1$DateTimeLogged", String.format("%02d", month) + "/" + String.format("%02d", day) + "/" + String.format("%04d", year), - "ctl00$ContentBody$LogBookPanel1$DateTimeLogged$Month", Integer.toString(month), - "ctl00$ContentBody$LogBookPanel1$DateTimeLogged$Day", Integer.toString(day), - "ctl00$ContentBody$LogBookPanel1$DateTimeLogged$Year", Integer.toString(year), + "ctl00$ContentBody$LogBookPanel1$uxDateVisited", String.format("%02d", month) + "/" + String.format("%02d", day) + "/" + String.format("%04d", year), + "ctl00$ContentBody$LogBookPanel1$uxDateVisited$Month", Integer.toString(month), + "ctl00$ContentBody$LogBookPanel1$uxDateVisited$Day", Integer.toString(day), + "ctl00$ContentBody$LogBookPanel1$uxDateVisited$Year", Integer.toString(year), "ctl00$ContentBody$LogBookPanel1$uxLogInfo", logInfo, - "ctl00$ContentBody$LogBookPanel1$LogButton", "Submit Log Entry", + "ctl00$ContentBody$LogBookPanel1$btnSubmitLog", "Submit Log Entry", + "ctl00$ContentBody$LogBookPanel1$uxLogCreationSource", "Old", "ctl00$ContentBody$uxVistOtherListingGC", ""); Login.putViewstates(params, viewstates); if (trackables != null && !trackables.isEmpty()) { // we have some trackables to proceed diff --git a/tests/src/cgeo/geocaching/cgeoApplicationTest.java b/tests/src/cgeo/geocaching/cgeoApplicationTest.java index a877660..82e31f7 100644 --- a/tests/src/cgeo/geocaching/cgeoApplicationTest.java +++ b/tests/src/cgeo/geocaching/cgeoApplicationTest.java @@ -121,7 +121,7 @@ public class cgeoApplicationTest extends CGeoTestCase { public static void testSearchByGeocodeNotExisting() { final SearchResult search = Geocache.searchByGeocode("GC123456", null, 0, true, null); assertNotNull(search); - assertEquals(StatusCode.UNPUBLISHED_CACHE, search.getError()); + assertEquals(StatusCode.COMMUNICATION_ERROR, search.getError()); } /** diff --git a/tests/src/cgeo/test/Compare.java b/tests/src/cgeo/test/Compare.java index 24ed596..3b3ff5a 100644 --- a/tests/src/cgeo/test/Compare.java +++ b/tests/src/cgeo/test/Compare.java @@ -41,7 +41,7 @@ public abstract class Compare { assertEquals(expected.isWatchlist(), actual.isWatchlist()); for (String attribute : expected.getAttributes()) { - assertTrue(actual.getAttributes().contains(attribute)); + assertTrue("Expected attribute '" + attribute + "' not found in " + actual.getGeocode(), actual.getAttributes().contains(attribute)); } for (LogType logType : expected.getLogCounts().keySet()) { assertTrue(actual.getLogCounts().get(logType) >= expected.getLogCounts().get(logType)); |
