Update of /cvsroot/php-blog/serendipity/plugins/serendipity_event_spamblock
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30625
Modified Files:
serendipity_event_spamblock.php
Log Message:
- Unbreak logging (sorry)
- Log time (H:i:s)
- Remove '%' chars from date() function - Should I ask why they were there? :)
- Add linebreak at the end of the logstring
Index: serendipity_event_spamblock.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/plugins/serendipity_event_spamblock/serendipity_event_spamblock.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- serendipity_event_spamblock.php 23 Sep 2004 12:50:28 -0000 1.11
+++ serendipity_event_spamblock.php 23 Sep 2004 13:02:59 -0000 1.12
@@ -391,17 +391,17 @@
function log($logfile, $id, $switch, $reason, $comment) {
global $serendipity;
- if (empty($log)) {
+ if (empty($logfile)) {
return;
}
- $fp = @fopen($logfile, 'a+');
+ $fp = fopen($logfile, 'a+');
if ( !is_resource($fp) ) {
return;
}
fwrite($fp, sprintf(
- '[%s] - [%s: %s] - [#%d, Name "%s", E-Mail "%s", URL "%s", User-Agent "%s", IP %s] - [%s]',
- date('%Y-%m-%d'),
+ '[%s] - [%s: %s] - [#%d, Name "%s", E-Mail "%s", URL "%s", User-Agent "%s", IP %s] - [%s]' . "\n",
+ date('Y-m-d H:i:s'),
$switch,
$reason,
$id,
|