* Added ability to use strftime variables in the spamblock.log

filename. (kleinerchemiker)
This commit is contained in:
Garvin Hicking 2009-02-20 12:36:46 +00:00
parent 275049c5d0
commit c27d6719f4
2 changed files with 8 additions and 2 deletions

View File

@ -3,6 +3,9 @@
Version 1.5 () 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 * Added improved Blogger.com importer using the API, thanks to jaa
* Change password hashing from plain md5 to salted SHA1. Logins * Change password hashing from plain md5 to salted SHA1. Logins

View File

@ -39,7 +39,7 @@ var $filter_defaults;
'smarty' => '2.6.7', 'smarty' => '2.6.7',
'php' => '4.1.0' 'php' => '4.1.0'
)); ));
$propbag->add('version', '1.73'); $propbag->add('version', '1.74');
$propbag->add('event_hooks', array( $propbag->add('event_hooks', array(
'frontend_saveComment' => true, 'frontend_saveComment' => true,
'external_plugin' => true, 'external_plugin' => true,
@ -319,7 +319,7 @@ var $filter_defaults;
$propbag->add('type', 'string'); $propbag->add('type', 'string');
$propbag->add('name', PLUGIN_EVENT_SPAMBLOCK_LOGFILE); $propbag->add('name', PLUGIN_EVENT_SPAMBLOCK_LOGFILE);
$propbag->add('description', PLUGIN_EVENT_SPAMBLOCK_LOGFILE_DESC); $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; break;
case 'logtype': case 'logtype':
@ -1467,6 +1467,9 @@ var $filter_defaults;
if (empty($logfile)) { if (empty($logfile)) {
return; return;
} }
if (strpos($logfile, '%') !== false) {
$logfile = strftime($logfile);
}
$fp = @fopen($logfile, 'a+'); $fp = @fopen($logfile, 'a+');
if (!is_resource($fp)) { if (!is_resource($fp)) {