Permalink
Browse files

Added option to allow for selection of day you are saving a stat

for.
  • Loading branch information...
1 parent 8e56f5c commit 84cc7e2b1d0d6d12b2bd08189d3dca17edaebba3 @tvroom tvroom committed Aug 29, 2003
Showing with 3 additions and 2 deletions.
  1. +3 −2 plugins/Stats/Writer/Writer.pm
View
5 plugins/Stats/Writer/Writer.pm
@@ -42,18 +42,19 @@ sub createStatDaily {
my($self, $name, $value, $options) = @_;
$value = 0 unless $value;
$options ||= {};
+ my $day = $options->{day} || $self->{_day};
my $section = $options->{section} || 'all';
my $insert = {
- 'day' => $self->{_day},
+ 'day' => $day,
'name' => $name,
'value' => $value,
};
$insert->{section} = $section;
my $overwrite = $self->{_overwrite} || $options->{overwrite};
if ($overwrite) {
- my $where = "day=" . $self->sqlQuote($self->{_day})
+ my $where = "day=" . $self->sqlQuote($day)
. " AND name=" . $self->sqlQuote($name);
$where .= " AND section=" . $self->sqlQuote($section);
$self->{_dbh}{AutoCommit} = 0;

0 comments on commit 84cc7e2

Please sign in to comment.