Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1:/tmp/cvs-serv27976
Modified Files:
serendipity_functions.inc.php
Log Message:
Show comment timestamps in 24-hour format
Make cancelSubscription return the number of affected rows
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -d -r1.138 -r1.139
--- serendipity_functions.inc.php 17 Aug 2003 20:51:04 -0000 1.138
+++ serendipity_functions.inc.php 19 Aug 2003 16:09:43 -0000 1.139
@@ -771,7 +771,7 @@
}
/* Show when the entry was made */
- echo ' ' . ON . ' ' . date('M d, h:i', $comment['timestamp']);
+ echo ' ' . ON . ' ' . date('M d, H:i', $comment['timestamp']);
if ( $_SESSION['serendipityAuthedUser'] === true ) {
echo ' (<a href="' . $serendipity['baseURL'] . 'comment.php?serendipity[delete]=' . $comment['id'] . '&serendipity[entry]=' . $comment['entry_id'] . '&serendipity[type]=comments">' . DELETE . '</a>)';
@@ -909,8 +909,13 @@
function serendipity_cancelSubscription($email, $entry_id) {
global $serendipity;
- $sql = "UPDATE {$serendipity['dbPrefix']}comments SET subscribed = 'false' WHERE entry_id = $entry_id AND email = '$email'";
+ $sql = "UPDATE {$serendipity['dbPrefix']}comments
+ SET subscribed = 'false'
+ WHERE entry_id = $entry_id
+ AND email = '$email'";
serendipity_db_query($sql);
+
+ return serendipity_db_affected_rows();
}
function serendipity_sendComment($to, $fromName, $fromEmail, $fromUrl, $id, $title, $comment, $type = 'NORMAL') {
|