*) comment mode is 'moderated' instead of 'activated' by default now (to avoid spam being visible)

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5465 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
low012 16 years ago
parent b2a8c653ee
commit f26b8fcb1b

@ -48,6 +48,7 @@
</p> </p>
:: ::
<!-- 1: edit --> <!-- 1: edit -->
<h2>Edit</h2>
<form action="Blog.html" method="post" enctype="multipart/form-data" accept-charset="UTF-8"> <form action="Blog.html" method="post" enctype="multipart/form-data" accept-charset="UTF-8">
<fieldset> <fieldset>
<dl> <dl>
@ -115,6 +116,7 @@
<select name="commentMode" id="commentMode"> <select name="commentMode" id="commentMode">
<option value="0" #(commentMode)#selected="selected"::#(/commentMode)#>deactivated</option> <option value="0" #(commentMode)#selected="selected"::#(/commentMode)#>deactivated</option>
<option value="1" #(commentMode)#::selected="selected"#(/commentMode)#>activated</option> <option value="1" #(commentMode)#::selected="selected"#(/commentMode)#>activated</option>
<option value="2" #(commentMode)#::::selected="selected"#(/commentMode)#>moderated</option>
</select> </select>
</dd> </dd>
</dl> </dl>

@ -7,7 +7,7 @@
// //
// This File is contributed by Jan Sandbrink // This File is contributed by Jan Sandbrink
// Contains contributions from Marc Nause [MN] // Contains contributions from Marc Nause [MN]
// last change: 06.05.2006 // last change: 10.01.2009
// //
// This program is free software; you can redistribute it and/or modify // This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by // it under the terms of the GNU General Public License as published by
@ -153,7 +153,7 @@ public class Blog {
comments = page.getComments(); comments = page.getComments();
date = page.getDate(); date = page.getDate();
} }
final String commentMode = post.get("commentMode", "1"); final String commentMode = post.get("commentMode", "2");
final String StrSubject = post.get("subject", ""); final String StrSubject = post.get("subject", "");
byte[] subject; byte[] subject;
try { try {
@ -194,7 +194,7 @@ public class Blog {
//preview the page //preview the page
if(hasRights) { if(hasRights) {
prop.put("mode", "2");//preview prop.put("mode", "2");//preview
prop.put("mode_commentMode", post.getInt("commentMode", 1)); prop.put("mode_commentMode", post.getInt("commentMode", 2));
prop.putHTML("mode_pageid", pagename); prop.putHTML("mode_pageid", pagename);
try { try {
prop.putHTML("mode_author", new String(author, "UTF-8")); prop.putHTML("mode_author", new String(author, "UTF-8"));

@ -360,7 +360,7 @@ public class blogBoard {
this.key = key; this.key = key;
this.record = record; this.record = record;
if (this.record.get("comments")==null) this.record.put("comments", listManager.collection2string(new ArrayList<String>())); if (this.record.get("comments")==null) this.record.put("comments", listManager.collection2string(new ArrayList<String>()));
if (this.record.get("commentMode")==null || this.record.get("commentMode").equals("")) this.record.put("commentMode", "1"); if (this.record.get("commentMode")==null || this.record.get("commentMode").equals("")) this.record.put("commentMode", "2");
} }
private void setKey(final String key) { private void setKey(final String key) {
@ -506,7 +506,7 @@ public class blogBoard {
private void setCommentMode(final String mode) { private void setCommentMode(final String mode) {
if (mode == null) if (mode == null)
record.put("commentMode", "1"); record.put("commentMode", "2");
else else
record.put("commentMode", mode); record.put("commentMode", mode);
} }

Loading…
Cancel
Save