Pruning logs > Invisionize.eu - IP.Board (IPB) News
Kanał Rss Kanał Rss
Kanał Atom Kanał Atom

Pruning logs

wersja drukowalna wersja Microsoft Word wersja HTML

In /admin/applications_addon/ips/ipchat/tasks/prune.php we have this:

if( $this->settings[ 'ipchat_log_prune' ] > 0 )
{
$time = time() - ( $this->settings[ 'ipchat_log_prune' ] * 60 * 60 * 24 );

$this->DB->delete( 'chat_log_archive', "log_time < {$time}" );

$this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_chat' ), 'ipchat' );
$this->class->appendTaskLog( $this->task, $this->lang->words['chatlogs_pruned'] );
}

What I'm interested is this:

$this->DB->delete( 'chat_log_archive', "log_time < {$time}" );

I believe the less than there, should be a greater than? Right now we're pruning logs if they're YOUNGER than the acp-defined cut-off, which isn't the desired behaviour, we should be pruning logs if they're OLDER than the ACP-defined cut-off.

So it should be:

$this->DB->delete( 'chat_log_archive', "log_time > {$time}" );

Right?

czw, 09 sierpień 2012