Changeset 11483 for trunk

Show
Ignore:
Timestamp:
10/08/08 09:38:22 (3 months ago)
Author:
juruen@…
Message:

Bug fix: use the new API in purge method. Now purging logs is working

again.

Location:
trunk/client/ebox
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/client/ebox/ChangeLog

    r11419 r11483  
     10.12.3 
     2        + Bug fix: use the new API in purge method. Now purging logs is working 
     3        again. 
    140.12.2 
    25        + Increase random string length used to generate the cookie to 
  • trunk/client/ebox/src/EBox/Logs.pm

    r11415 r11483  
    837837  # get the threshold date for each domain 
    838838  foreach my $row_r ( @{ $self->configureLogModel->rows() } ) { 
    839     my $valuesHash = $row_r->{plainValueHash}; 
    840     my $lifeTime = $valuesHash->{'lifeTime'}; 
     839    my $lifeTime = $row_r->valueByName('lifeTime'); 
    841840     
    842841    # if lifeTime == 0, it should never expire 
     
    845844 
    846845    my $threshold = $self->_thresholdDate($lifeTime); 
    847     $thresholdByDomain{$valuesHash->{'domain'}} = $threshold; 
     846    $thresholdByDomain{$row_r->valueByName('domain')} = $threshold; 
    848847  } 
    849848 
     
    873872  my ($self, $table, $timeCol, $thresholdDate) = @_; 
    874873 
    875   my $sqlStatement = "DELETE FROM $table WHERE '$timeCol' < '$thresholdDate'"; 
     874  my $sqlStatement = "DELETE FROM $table WHERE $timeCol < '$thresholdDate'"; 
    876875  my $dbengine = EBox::DBEngineFactory::DBEngine(); 
    877876  $dbengine->query($sqlStatement);