Skip to content

Commit

Permalink
add fallback to textbutton$0
Browse files Browse the repository at this point in the history
  • Loading branch information
johan12345 committed Jan 30, 2018
1 parent 5780814 commit 01999f5
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1104,8 +1104,8 @@ public ProlongResult prolong(String media, Account account, int useraction,
}
form.add(new BasicNameValuePair(media.split("\\|")[0], "on"));
// Stuttgart: textButton$0, others: textButton$1
form.add(new BasicNameValuePair(
doc.select("input[value=Markierte Titel verlängern]").attr("name"),
String buttonName = doc.select("input[value=Markierte Titel verlängern]").attr("name");
form.add(new BasicNameValuePair(!"".equals(buttonName) ? buttonName : "textButton$1",
"Markierte Titel verlängern"));
doc = htmlPost(opac_url + ";jsessionid=" + s_sid, form);

Expand Down Expand Up @@ -1168,8 +1168,8 @@ public ProlongAllResult prolongAll(Account account, int useraction,
}
}
// Stuttgart: textButton$0, others: textButton$1
form.add(new BasicNameValuePair(
doc.select("input[value=Markierte Titel verlängern]").attr("name"),
String buttonName = doc.select("input[value=Markierte Titel verlängern]").attr("name");
form.add(new BasicNameValuePair(!"".equals(buttonName) ? buttonName : "textButton$1",
"Markierte Titel verlängern"));
doc = htmlPost(opac_url + ";jsessionid=" + s_sid, form);

Expand Down

0 comments on commit 01999f5

Please sign in to comment.