From 37d24f3318dfd51a63b134787cec288a73f7a418 Mon Sep 17 00:00:00 2001 From: reger Date: Wed, 16 Oct 2013 02:25:39 +0200 Subject: [PATCH] make use of declared static string ACTION_LOCATION --- htroot/Blacklist_p.java | 22 +++++++++++----------- htroot/BlogComments.java | 4 ++-- htroot/Connections_p.java | 2 +- htroot/Status.java | 4 ++-- htroot/User.java | 4 ++-- htroot/Wiki.java | 4 ++-- htroot/sharedBlacklist_p.java | 2 +- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/htroot/Blacklist_p.java b/htroot/Blacklist_p.java index 163225971..0f1fb8f56 100644 --- a/htroot/Blacklist_p.java +++ b/htroot/Blacklist_p.java @@ -124,7 +124,7 @@ public class Blacklist_p { blacklistToUse = post.get("newListName", "").trim(); if (blacklistToUse.isEmpty()) { - prop.put("LOCATION",""); + prop.put(serverObjects.ACTION_LOCATION,""); return prop; } @@ -171,7 +171,7 @@ public class Blacklist_p { blacklistToUse = post.get("selectedListName"); if (blacklistToUse == null || blacklistToUse.isEmpty()) { - prop.put("LOCATION",""); + prop.put(serverObjects.ACTION_LOCATION,""); return prop; } @@ -199,7 +199,7 @@ public class Blacklist_p { blacklistToUse = post.get("selectedListName", "").trim(); if (blacklistToUse == null || blacklistToUse.isEmpty()) { - prop.put("LOCATION", ""); + prop.put(serverObjects.ACTION_LOCATION, ""); return prop; } @@ -222,7 +222,7 @@ public class Blacklist_p { blacklistToUse = post.get("selectedListName", "").trim(); if (blacklistToUse == null || blacklistToUse.isEmpty()) { - prop.put("LOCATION", ""); + prop.put(serverObjects.ACTION_LOCATION, ""); return prop; } @@ -246,7 +246,7 @@ public class Blacklist_p { String temp = null; for (final String selectedBlacklistEntry : selectedBlacklistEntries) { if ((temp = deleteBlacklistEntry(blacklistToUse, selectedBlacklistEntry, header)) != null) { - prop.put("LOCATION", temp); + prop.put(serverObjects.ACTION_LOCATION, temp); return prop; } } @@ -269,7 +269,7 @@ public class Blacklist_p { final String temp = addBlacklistEntry(blacklistToUse, blentry, header); if (temp != null) { - prop.put("LOCATION", temp); + prop.put(serverObjects.ACTION_LOCATION, temp); return prop; } @@ -295,12 +295,12 @@ public class Blacklist_p { String temp; for (final String selectedBlacklistEntry : selectedBlacklistEntries) { if ((temp = addBlacklistEntry(targetBlacklist, selectedBlacklistEntry, header)) != null) { - prop.put("LOCATION", temp); + prop.put(serverObjects.ACTION_LOCATION, temp); return prop; } if ((temp = deleteBlacklistEntry(blacklistToUse, selectedBlacklistEntry, header)) != null) { - prop.put("LOCATION", temp); + prop.put(serverObjects.ACTION_LOCATION, temp); return prop; } @@ -326,7 +326,7 @@ public class Blacklist_p { final String[] selectedBlacklistEntries = post.getAll("selectedBlacklistEntry.*"); if (selectedBlacklistEntries.length != editedBlacklistEntries.length) { - prop.put("LOCATION", ""); + prop.put(serverObjects.ACTION_LOCATION, ""); return prop; } @@ -337,12 +337,12 @@ public class Blacklist_p { if (!selectedBlacklistEntries[i].equals(editedBlacklistEntries[i])) { if ((temp = deleteBlacklistEntry(blacklistToUse, selectedBlacklistEntries[i], header)) != null) { - prop.put("LOCATION", temp); + prop.put(serverObjects.ACTION_LOCATION, temp); return prop; } if ((temp = addBlacklistEntry(blacklistToUse, editedBlacklistEntries[i], header)) != null) { - prop.put("LOCATION", temp); + prop.put(serverObjects.ACTION_LOCATION, temp); return prop; } } diff --git a/htroot/BlogComments.java b/htroot/BlogComments.java index 26406cffc..d51bb6ff0 100644 --- a/htroot/BlogComments.java +++ b/htroot/BlogComments.java @@ -129,7 +129,7 @@ public class BlogComments { blogEntry.addComment(commentID); sb.blogDB.writeBlogEntry(blogEntry); sb.blogCommentDB.write(sb.blogCommentDB.newEntry(commentID, subject, author, ip, date, content)); - prop.putHTML("LOCATION","BlogComments.html?page=" + pagename); + prop.putHTML(serverObjects.ACTION_LOCATION,"BlogComments.html?page=" + pagename); MessageBoard.entry msgEntry = sb.messageDB.newEntry( "blogComment", @@ -179,7 +179,7 @@ public class BlogComments { // show blog-entry/entries prop.put("mode", "0"); //viewing if("blog_default".equals(pagename)) { - prop.put("LOCATION","Blog.html"); + prop.put(serverObjects.ACTION_LOCATION,"Blog.html"); } else { //show 1 blog entry prop.put("mode_pageid", page.getKey()); diff --git a/htroot/Connections_p.java b/htroot/Connections_p.java index efcf017df..dfa3826e8 100644 --- a/htroot/Connections_p.java +++ b/htroot/Connections_p.java @@ -65,7 +65,7 @@ public final class Connections_p { if (post.containsKey("closeServerSession")) { final String sessionName = post.get("closeServerSession", null); sb.closeSessions(sessionName); - prop.put("LOCATION",""); + prop.put(serverObjects.ACTION_LOCATION,""); return prop; } } else { diff --git a/htroot/Status.java b/htroot/Status.java index 3a4622674..751f4f339 100644 --- a/htroot/Status.java +++ b/htroot/Status.java @@ -80,7 +80,7 @@ public class Status } boolean redirect = false; if ( post.containsKey("login") ) { - prop.put("LOCATION", ""); + prop.put(serverObjects.ACTION_LOCATION, ""); return prop; } else if ( post.containsKey("pauseCrawlJob") ) { final String jobType = post.get("jobType"); @@ -112,7 +112,7 @@ public class Status } if ( redirect ) { - prop.put("LOCATION", ""); + prop.put(serverObjects.ACTION_LOCATION, ""); return prop; } } diff --git a/htroot/User.java b/htroot/User.java index ecc898361..6d2ae091d 100644 --- a/htroot/User.java +++ b/htroot/User.java @@ -120,7 +120,7 @@ public class User{ prop.put("logged-in_identified-by", "1"); prop.putHTML("logged-in_username", username); if(post.containsKey("returnto")){ - prop.put("LOCATION", post.get("returnto")); + prop.put(serverObjects.ACTION_LOCATION, post.get("returnto")); } } } @@ -160,7 +160,7 @@ public class User{ prop.authenticationRequired(); } if(post.containsKey("returnto")){ - prop.put("LOCATION", post.get("returnto")); + prop.put(serverObjects.ACTION_LOCATION, post.get("returnto")); } } // return rewrite properties diff --git a/htroot/Wiki.java b/htroot/Wiki.java index a3aa6b1f2..25a6ea225 100644 --- a/htroot/Wiki.java +++ b/htroot/Wiki.java @@ -123,8 +123,8 @@ public class Wiki { sb.peers.newsPool.publishMyNews(sb.peers.mySeed(), NewsPool.CATEGORY_WIKI_UPDATE, map); } page = newEntry; - prop.putHTML("LOCATION", "/Wiki.html?page=" + pagename); - prop.put("LOCATION", prop.get("LOCATION")); + prop.putHTML(serverObjects.ACTION_LOCATION, "/Wiki.html?page=" + pagename); + prop.put(serverObjects.ACTION_LOCATION, prop.get(serverObjects.ACTION_LOCATION)); } if (post != null && post.containsKey("edit")) { diff --git a/htroot/sharedBlacklist_p.java b/htroot/sharedBlacklist_p.java index 43c56b6b0..0bbea85fb 100644 --- a/htroot/sharedBlacklist_p.java +++ b/htroot/sharedBlacklist_p.java @@ -242,7 +242,7 @@ public class sharedBlacklist_p { * turn the ampersand into & which renders the parameters * useless (at least when using Opera 9.53, haven't tested other browsers) */ - prop.put("LOCATION","Blacklist_p.html?selectedListName=" + CharacterCoding.unicode2html(selectedBlacklistName, true) + "&selectList=select"); + prop.put(serverObjects.ACTION_LOCATION,"Blacklist_p.html?selectedListName=" + CharacterCoding.unicode2html(selectedBlacklistName, true) + "&selectList=select"); return prop; }