make use of declared static string ACTION_LOCATION

pull/1/head
reger 11 years ago
parent 0d4efabaa8
commit 37d24f3318

@ -124,7 +124,7 @@ public class Blacklist_p {
blacklistToUse = post.get("newListName", "").trim(); blacklistToUse = post.get("newListName", "").trim();
if (blacklistToUse.isEmpty()) { if (blacklistToUse.isEmpty()) {
prop.put("LOCATION",""); prop.put(serverObjects.ACTION_LOCATION,"");
return prop; return prop;
} }
@ -171,7 +171,7 @@ public class Blacklist_p {
blacklistToUse = post.get("selectedListName"); blacklistToUse = post.get("selectedListName");
if (blacklistToUse == null || blacklistToUse.isEmpty()) { if (blacklistToUse == null || blacklistToUse.isEmpty()) {
prop.put("LOCATION",""); prop.put(serverObjects.ACTION_LOCATION,"");
return prop; return prop;
} }
@ -199,7 +199,7 @@ public class Blacklist_p {
blacklistToUse = post.get("selectedListName", "").trim(); blacklistToUse = post.get("selectedListName", "").trim();
if (blacklistToUse == null || blacklistToUse.isEmpty()) { if (blacklistToUse == null || blacklistToUse.isEmpty()) {
prop.put("LOCATION", ""); prop.put(serverObjects.ACTION_LOCATION, "");
return prop; return prop;
} }
@ -222,7 +222,7 @@ public class Blacklist_p {
blacklistToUse = post.get("selectedListName", "").trim(); blacklistToUse = post.get("selectedListName", "").trim();
if (blacklistToUse == null || blacklistToUse.isEmpty()) { if (blacklistToUse == null || blacklistToUse.isEmpty()) {
prop.put("LOCATION", ""); prop.put(serverObjects.ACTION_LOCATION, "");
return prop; return prop;
} }
@ -246,7 +246,7 @@ public class Blacklist_p {
String temp = null; String temp = null;
for (final String selectedBlacklistEntry : selectedBlacklistEntries) { for (final String selectedBlacklistEntry : selectedBlacklistEntries) {
if ((temp = deleteBlacklistEntry(blacklistToUse, selectedBlacklistEntry, header)) != null) { if ((temp = deleteBlacklistEntry(blacklistToUse, selectedBlacklistEntry, header)) != null) {
prop.put("LOCATION", temp); prop.put(serverObjects.ACTION_LOCATION, temp);
return prop; return prop;
} }
} }
@ -269,7 +269,7 @@ public class Blacklist_p {
final String temp = addBlacklistEntry(blacklistToUse, blentry, header); final String temp = addBlacklistEntry(blacklistToUse, blentry, header);
if (temp != null) { if (temp != null) {
prop.put("LOCATION", temp); prop.put(serverObjects.ACTION_LOCATION, temp);
return prop; return prop;
} }
@ -295,12 +295,12 @@ public class Blacklist_p {
String temp; String temp;
for (final String selectedBlacklistEntry : selectedBlacklistEntries) { for (final String selectedBlacklistEntry : selectedBlacklistEntries) {
if ((temp = addBlacklistEntry(targetBlacklist, selectedBlacklistEntry, header)) != null) { if ((temp = addBlacklistEntry(targetBlacklist, selectedBlacklistEntry, header)) != null) {
prop.put("LOCATION", temp); prop.put(serverObjects.ACTION_LOCATION, temp);
return prop; return prop;
} }
if ((temp = deleteBlacklistEntry(blacklistToUse, selectedBlacklistEntry, header)) != null) { if ((temp = deleteBlacklistEntry(blacklistToUse, selectedBlacklistEntry, header)) != null) {
prop.put("LOCATION", temp); prop.put(serverObjects.ACTION_LOCATION, temp);
return prop; return prop;
} }
@ -326,7 +326,7 @@ public class Blacklist_p {
final String[] selectedBlacklistEntries = post.getAll("selectedBlacklistEntry.*"); final String[] selectedBlacklistEntries = post.getAll("selectedBlacklistEntry.*");
if (selectedBlacklistEntries.length != editedBlacklistEntries.length) { if (selectedBlacklistEntries.length != editedBlacklistEntries.length) {
prop.put("LOCATION", ""); prop.put(serverObjects.ACTION_LOCATION, "");
return prop; return prop;
} }
@ -337,12 +337,12 @@ public class Blacklist_p {
if (!selectedBlacklistEntries[i].equals(editedBlacklistEntries[i])) { if (!selectedBlacklistEntries[i].equals(editedBlacklistEntries[i])) {
if ((temp = deleteBlacklistEntry(blacklistToUse, selectedBlacklistEntries[i], header)) != null) { if ((temp = deleteBlacklistEntry(blacklistToUse, selectedBlacklistEntries[i], header)) != null) {
prop.put("LOCATION", temp); prop.put(serverObjects.ACTION_LOCATION, temp);
return prop; return prop;
} }
if ((temp = addBlacklistEntry(blacklistToUse, editedBlacklistEntries[i], header)) != null) { if ((temp = addBlacklistEntry(blacklistToUse, editedBlacklistEntries[i], header)) != null) {
prop.put("LOCATION", temp); prop.put(serverObjects.ACTION_LOCATION, temp);
return prop; return prop;
} }
} }

@ -129,7 +129,7 @@ public class BlogComments {
blogEntry.addComment(commentID); blogEntry.addComment(commentID);
sb.blogDB.writeBlogEntry(blogEntry); sb.blogDB.writeBlogEntry(blogEntry);
sb.blogCommentDB.write(sb.blogCommentDB.newEntry(commentID, subject, author, ip, date, content)); 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( MessageBoard.entry msgEntry = sb.messageDB.newEntry(
"blogComment", "blogComment",
@ -179,7 +179,7 @@ public class BlogComments {
// show blog-entry/entries // show blog-entry/entries
prop.put("mode", "0"); //viewing prop.put("mode", "0"); //viewing
if("blog_default".equals(pagename)) { if("blog_default".equals(pagename)) {
prop.put("LOCATION","Blog.html"); prop.put(serverObjects.ACTION_LOCATION,"Blog.html");
} else { } else {
//show 1 blog entry //show 1 blog entry
prop.put("mode_pageid", page.getKey()); prop.put("mode_pageid", page.getKey());

@ -65,7 +65,7 @@ public final class Connections_p {
if (post.containsKey("closeServerSession")) { if (post.containsKey("closeServerSession")) {
final String sessionName = post.get("closeServerSession", null); final String sessionName = post.get("closeServerSession", null);
sb.closeSessions(sessionName); sb.closeSessions(sessionName);
prop.put("LOCATION",""); prop.put(serverObjects.ACTION_LOCATION,"");
return prop; return prop;
} }
} else { } else {

@ -80,7 +80,7 @@ public class Status
} }
boolean redirect = false; boolean redirect = false;
if ( post.containsKey("login") ) { if ( post.containsKey("login") ) {
prop.put("LOCATION", ""); prop.put(serverObjects.ACTION_LOCATION, "");
return prop; return prop;
} else if ( post.containsKey("pauseCrawlJob") ) { } else if ( post.containsKey("pauseCrawlJob") ) {
final String jobType = post.get("jobType"); final String jobType = post.get("jobType");
@ -112,7 +112,7 @@ public class Status
} }
if ( redirect ) { if ( redirect ) {
prop.put("LOCATION", ""); prop.put(serverObjects.ACTION_LOCATION, "");
return prop; return prop;
} }
} }

@ -120,7 +120,7 @@ public class User{
prop.put("logged-in_identified-by", "1"); prop.put("logged-in_identified-by", "1");
prop.putHTML("logged-in_username", username); prop.putHTML("logged-in_username", username);
if(post.containsKey("returnto")){ 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(); prop.authenticationRequired();
} }
if(post.containsKey("returnto")){ if(post.containsKey("returnto")){
prop.put("LOCATION", post.get("returnto")); prop.put(serverObjects.ACTION_LOCATION, post.get("returnto"));
} }
} }
// return rewrite properties // return rewrite properties

@ -123,8 +123,8 @@ public class Wiki {
sb.peers.newsPool.publishMyNews(sb.peers.mySeed(), NewsPool.CATEGORY_WIKI_UPDATE, map); sb.peers.newsPool.publishMyNews(sb.peers.mySeed(), NewsPool.CATEGORY_WIKI_UPDATE, map);
} }
page = newEntry; page = newEntry;
prop.putHTML("LOCATION", "/Wiki.html?page=" + pagename); prop.putHTML(serverObjects.ACTION_LOCATION, "/Wiki.html?page=" + pagename);
prop.put("LOCATION", prop.get("LOCATION")); prop.put(serverObjects.ACTION_LOCATION, prop.get(serverObjects.ACTION_LOCATION));
} }
if (post != null && post.containsKey("edit")) { if (post != null && post.containsKey("edit")) {

@ -242,7 +242,7 @@ public class sharedBlacklist_p {
* turn the ampersand into & which renders the parameters * turn the ampersand into & which renders the parameters
* useless (at least when using Opera 9.53, haven't tested other browsers) * 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; return prop;
} }

Loading…
Cancel
Save