page = switchboard.blogDB.read(pagename); //maybe "if(page == null)"
if (post.containsKey("edit")) {
if(hasRights) {
try {
prop.put("mode", 1); //edit
<BUG>prop.put("mode_author", author);
</BUG>
prop.put("mode_pageid", page.key());
<BUG>prop.put("mode_subject", page.subject());
</BUG>
prop.put("mode_page-code", new String(page.page(), "UTF-8").replaceAll("<","&lt;").replaceAll(">","&gt;"));

page = switchboard.blogDB.read(pagename); //maybe "if(page == null)"
if (post.containsKey("edit")) {
if(hasRights) {
try {
prop.put("mode", 1); //edit
prop.put("mode_author", wikiCode.replaceHTML(author));
prop.put("mode_pageid", page.key());
prop.put("mode_subject", wikiCode.replaceHTML(page.subject()));
prop.put("mode_page-code", new String(page.page(), "UTF-8").replaceAll("<","&lt;").replaceAll(">","&gt;"));
