Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24127
Modified Files:
NEWS serendipity_functions.inc.php
Log Message:
New way of comment posting only worked with mod_rewrite. Now made it
function without the need for errordocs/mod_rewrite.
Note to myself: ErrorDocument redirection DOES NOT redirect POST request
data. :)
Index: NEWS
===================================================================
RCS file: /cvsroot/php-blog/serendipity/NEWS,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- NEWS 25 Feb 2004 08:41:24 -0000 1.76
+++ NEWS 25 Feb 2004 13:57:05 -0000 1.77
@@ -2,6 +2,8 @@
Version 0.5.1 ()
------------------------------------
+ * Now able to preview comments. (garvinhicking)
+ * Fixed bug that removed admin-cookie when you didn't check the "remember comment" box on submitting comments to your own blog (garvinhicking)
* Conditional GET logic for RSS feeds using HTTP caching methods. See README for instructions, needs database schema update [db_update-0.5-0.5.1.sql] (garvinhicking)
* Small XHTML-compliance fixes. (garvinhicking)
* Image manager: Allow sorting by date/file attributes, changing sort order and choosing items displayed per page (garvinhicking)
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.216
retrieving revision 1.217
diff -u -d -r1.216 -r1.217
--- serendipity_functions.inc.php 25 Feb 2004 10:50:41 -0000 1.216
+++ serendipity_functions.inc.php 25 Feb 2004 13:57:05 -0000 1.217
@@ -199,12 +199,12 @@
<?php
}
-function serendipity_displayCommentForm($id) {
+function serendipity_displayCommentForm($id, $url = '?') {
global $serendipity;
?>
<div class="serendipityCommentForm">
- <form <?php echo ($serendipity['XHTML11'] ? 'id' : 'name'); ?>="serendipity_comment" action="?" method="post" onsubmit="if (this.serendipity_remember.checked) rememberMe(this, '<?php echo $_SERVER['HTTP_HOST']; ?>')">
+ <form <?php echo ($serendipity['XHTML11'] ? 'id' : 'name'); ?>="serendipity_comment" action="<?php echo $url; ?>" method="post" onsubmit="if (this.serendipity_remember.checked) rememberMe(this, '<?php echo $_SERVER['HTTP_HOST']; ?>')">
<div><input type="hidden" name="serendipity[entry_id]" value="<?php echo $id; ?>" /></div>
<table border="0" width="100%" cellpadding="3">
<tr>
@@ -229,7 +229,7 @@
<tr>
<td> </td>
<td class="serendipity_commentsLabel">
- <input id="checkbox_remember" type="checkbox" name="serendipity[remember]" <?php echo $serendipity['COOKIE']['remember'] ; ?> /><label for="checkbox_remember"> <?php echo REMEMBER_INFO; ?></label>
+ <input id="checkbox_remember" type="checkbox" name="serendipity[remember]" <?php echo ($serendipity['POST']['remember'] ? 'checked="checked"' : $serendipity['COOKIE']['remember']) ; ?> /><label for="checkbox_remember"> <?php echo REMEMBER_INFO; ?></label>
<?php
if ($serendipity['allowSubscriptions']) {
?>
@@ -910,7 +910,7 @@
?>
<br />
<div class="serendipity_commentsTitle"><?php echo ADD_COMMENT; ?></div>
- <?php echo serendipity_displayCommentForm($entry['id']); ?>
+ <?php echo serendipity_displayCommentForm($entry['id'], $serendipity['serendipityHTTPPath'] . $serendipity['indexFile'] . '?url=' . serendipity_archiveURL($entry['id'], $entry['title'])); ?>
<?php
} else {
?>
|