aboutsummaryrefslogtreecommitdiffstats
path: root/main/src
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2013-05-31 18:23:37 +0200
committerBananeweizen <bananeweizen@gmx.de>2013-05-31 18:23:37 +0200
commitd6046fba9b63fa2ef5a6d1b86a88cbefbdfaf76a (patch)
treecb4246c0c2780956d41e796fa1ed48c9781a9bce /main/src
parent091e20a21ee3b19ba94ac01aaa5c51d0c2c0ae6c (diff)
downloadcgeo-d6046fba9b63fa2ef5a6d1b86a88cbefbdfaf76a.zip
cgeo-d6046fba9b63fa2ef5a6d1b86a88cbefbdfaf76a.tar.gz
cgeo-d6046fba9b63fa2ef5a6d1b86a88cbefbdfaf76a.tar.bz2
#2810 #2815 make parser work with old and new web page
Diffstat (limited to 'main/src')
-rw-r--r--main/src/cgeo/geocaching/connector/gc/GCParser.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/connector/gc/GCParser.java b/main/src/cgeo/geocaching/connector/gc/GCParser.java
index ca29f27..b2705b2 100644
--- a/main/src/cgeo/geocaching/connector/gc/GCParser.java
+++ b/main/src/cgeo/geocaching/connector/gc/GCParser.java
@@ -976,6 +976,11 @@ public abstract class GCParser {
"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$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$LogButton", "Submit Log Entry",
"ctl00$ContentBody$LogBookPanel1$uxLogInfo", logInfo,
"ctl00$ContentBody$LogBookPanel1$btnSubmitLog", "Submit Log Entry",
"ctl00$ContentBody$LogBookPanel1$uxLogCreationSource", "Old",
@@ -1159,17 +1164,24 @@ public abstract class GCParser {
"ctl00$ContentBody$LogBookPanel1$tbCode", trackingCode);
Login.putViewstates(params, viewstates);
if (currentDate.get(Calendar.YEAR) == year && (currentDate.get(Calendar.MONTH) + 1) == month && currentDate.get(Calendar.DATE) == day) {
+ params.put("ctl00$ContentBody$LogBookPanel1$DateTimeLogged", "");
params.put("ctl00$ContentBody$LogBookPanel1$uxDateVisited", "");
} else {
+ params.put("ctl00$ContentBody$LogBookPanel1$DateTimeLogged", Integer.toString(month) + "/" + Integer.toString(day) + "/" + Integer.toString(year));
params.put("ctl00$ContentBody$LogBookPanel1$uxDateVisited", Integer.toString(month) + "/" + Integer.toString(day) + "/" + Integer.toString(year));
}
params.put(
+ "ctl00$ContentBody$LogBookPanel1$DateTimeLogged$Day", Integer.toString(day),
+ "ctl00$ContentBody$LogBookPanel1$DateTimeLogged$Month", Integer.toString(month),
+ "ctl00$ContentBody$LogBookPanel1$DateTimeLogged$Year", Integer.toString(year),
"ctl00$ContentBody$LogBookPanel1$uxDateVisited$Day", Integer.toString(day),
"ctl00$ContentBody$LogBookPanel1$uxDateVisited$Month", Integer.toString(month),
"ctl00$ContentBody$LogBookPanel1$uxDateVisited$Year", Integer.toString(year),
"ctl00$ContentBody$LogBookPanel1$uxLogInfo", logInfo,
"ctl00$ContentBody$LogBookPanel1$btnSubmitLog", "Submit Log Entry",
- "ctl00$ContentBody$uxVistOtherTrackableTB", "");
+ "ctl00$ContentBody$uxVistOtherTrackableTB", "",
+ "ctl00$ContentBody$LogBookPanel1$LogButton", "Submit Log Entry",
+ "ctl00$ContentBody$uxVistOtherListingGC", "");
final String uri = new Uri.Builder().scheme("http").authority("www.geocaching.com").path("/track/log.aspx").encodedQuery("wid=" + tbid).build().toString();
final String page = Login.postRequestLogged(uri, params);