From c27d6719f437ce41e68cdc8afcd9393afc4d9645 Mon Sep 17 00:00:00 2001 From: Garvin Hicking Date: Fri, 20 Feb 2009 12:36:46 +0000 Subject: [PATCH] * Added ability to use strftime variables in the spamblock.log filename. (kleinerchemiker) --- docs/NEWS | 3 +++ .../serendipity_event_spamblock.php | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/NEWS b/docs/NEWS index ea5040a8..30729371 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -3,6 +3,9 @@ Version 1.5 () ------------------------------------------------------------------------ + * Added ability to use strftime variables in the spamblock.log + filename. (kleinerchemiker) + * Added improved Blogger.com importer using the API, thanks to jaa * Change password hashing from plain md5 to salted SHA1. Logins diff --git a/plugins/serendipity_event_spamblock/serendipity_event_spamblock.php b/plugins/serendipity_event_spamblock/serendipity_event_spamblock.php index 958828b4..7bfc6228 100644 --- a/plugins/serendipity_event_spamblock/serendipity_event_spamblock.php +++ b/plugins/serendipity_event_spamblock/serendipity_event_spamblock.php @@ -39,7 +39,7 @@ var $filter_defaults; 'smarty' => '2.6.7', 'php' => '4.1.0' )); - $propbag->add('version', '1.73'); + $propbag->add('version', '1.74'); $propbag->add('event_hooks', array( 'frontend_saveComment' => true, 'external_plugin' => true, @@ -319,7 +319,7 @@ var $filter_defaults; $propbag->add('type', 'string'); $propbag->add('name', PLUGIN_EVENT_SPAMBLOCK_LOGFILE); $propbag->add('description', PLUGIN_EVENT_SPAMBLOCK_LOGFILE_DESC); - $propbag->add('default', $serendipity['serendipityPath'] . 'spamblock.log'); + $propbag->add('default', $serendipity['serendipityPath'] . 'spamblock-%Y-%m-%d.log'); break; case 'logtype': @@ -1467,6 +1467,9 @@ var $filter_defaults; if (empty($logfile)) { return; } + if (strpos($logfile, '%') !== false) { + $logfile = strftime($logfile); + } $fp = @fopen($logfile, 'a+'); if (!is_resource($fp)) {