Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2038
Modified Files:
serendipity_config.inc.php serendipity_functions.inc.php
Log Message:
Added moderatecommentsdefault setting to config file, analogous to the
allowcommentsdefault setting.
I decided against cookies because it may get too confusing if you edit an
entry to remove a flag and then have that as default for new settings. It's
more intuiviely IMHO if we don't set it depend on the last user action.
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.371
retrieving revision 1.372
diff -u -d -r1.371 -r1.372
--- serendipity_functions.inc.php 27 Jul 2004 17:16:43 -0000 1.371
+++ serendipity_functions.inc.php 28 Jul 2004 08:46:38 -0000 1.372
@@ -2725,6 +2725,9 @@
if (isset($entry['moderate_comments']) && (serendipity_db_bool($entry['moderate_comments']))) {
$moderate_comments = ' checked="checked"';
+ } elseif (!isset($entry['moderate_comments']) && ($serendipity['moderateCommentsDefault'] == 'true' || $serendipity['moderateCommentsDefault'] === true)) {
+ // This is the default on creation of a new entry and depends on the "moderateCommentsDefault" variable of the configuration.
+ $moderate_comments = ' checked="checked"';
} else {
$moderate_comments = '';
}
Index: serendipity_config.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_config.inc.php,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -d -r1.88 -r1.89
--- serendipity_config.inc.php 23 Jul 2004 00:22:52 -0000 1.88
+++ serendipity_config.inc.php 28 Jul 2004 08:46:38 -0000 1.89
@@ -31,6 +31,9 @@
// Is the possibility to comment and entry enabled by default?
$serendipity['allowCommentsDefault'] = true;
+// Should comment moderation be enabled by default?
+$serendipity['moderateCommentsDefault'] = false;
+
// How much time is allowed to pass since the publising of an entry, so that a comment to that entry
// will update it's LastModified stamp? If the time is passed, a comment to an old entry will no longer
// push an article as being updated.
|