bugfix Tables_p for edit and delete selected row (correction to use "pk_" html prefex)

pull/1/head
reger 13 years ago
parent ee553d971e
commit ae335a4190

@ -76,7 +76,7 @@ public class Tables_p {
if (post.get("deleterows", "").length() > 0) { if (post.get("deleterows", "").length() > 0) {
for (final Map.Entry<String, String> entry: post.entrySet()) { for (final Map.Entry<String, String> entry: post.entrySet()) {
if (entry.getValue().startsWith("pk_")) try { if (entry.getValue().startsWith("pk_")) try {
sb.tables.delete(table, entry.getValue().substring(5).getBytes()); sb.tables.delete(table, entry.getValue().substring(3).getBytes());
} catch (final IOException e) { } catch (final IOException e) {
Log.logException(e); Log.logException(e);
} }
@ -117,8 +117,8 @@ public class Tables_p {
// check if we can find a key // check if we can find a key
String pk = null; String pk = null;
for (final Map.Entry<String, String> entry: post.entrySet()) { for (final Map.Entry<String, String> entry: post.entrySet()) {
if (entry.getValue().startsWith("mark_")) { if (entry.getValue().startsWith("pk_")) {
pk = entry.getValue().substring(5); pk = entry.getValue().substring(3);
break; break;
} }
} }

Loading…
Cancel
Save