make use of declared static string ACTION_LOCATION

This commit is contained in:
reger 2013-10-16 02:25:39 +02:00
parent 0d4efabaa8
commit 37d24f3318
7 changed files with 21 additions and 21 deletions

View File

@ -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;
}
}

View File

@ -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());

View File

@ -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 {

View File

@ -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;
}
}

View File

@ -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

View File

@ -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")) {

View File

@ -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;
}