diff options
author | lpsolit%gmail.com <> | 2006-08-20 03:56:50 +0000 |
---|---|---|
committer | lpsolit%gmail.com <> | 2006-08-20 03:56:50 +0000 |
commit | 045e964867ae036ddc7d5b41a03dd48d8f291ee7 (patch) | |
tree | fa668e254d6e329b3a7a3c0deceeba1c542af349 /Bugzilla/Series.pm | |
parent | 59285f71c6ed0d4db7d4b0455902130a2d7c83bd (diff) | |
download | bugs-045e964867ae036ddc7d5b41a03dd48d8f291ee7.tar bugs-045e964867ae036ddc7d5b41a03dd48d8f291ee7.tar.gz bugs-045e964867ae036ddc7d5b41a03dd48d8f291ee7.tar.bz2 bugs-045e964867ae036ddc7d5b41a03dd48d8f291ee7.tar.xz bugs-045e964867ae036ddc7d5b41a03dd48d8f291ee7.zip |
Bug 346241: Make series.creator nullable in the DB and use NULL for series with creator 0 - Patch by Rémi Zara <remi_zara@mac.com> r=wicked a=myk
Diffstat (limited to 'Bugzilla/Series.pm')
-rw-r--r-- | Bugzilla/Series.pm | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Bugzilla/Series.pm b/Bugzilla/Series.pm index 4693a7131..011e60168 100644 --- a/Bugzilla/Series.pm +++ b/Bugzilla/Series.pm @@ -36,8 +36,6 @@ use Bugzilla::Error; use Bugzilla::Util; use Bugzilla::User; -use constant PUBLIC_USER_ID => 0; - sub new { my $invocant = shift; my $class = ref($invocant) || $invocant; @@ -201,10 +199,9 @@ sub writeToDatabase { # Insert the new series into the series table $dbh->do("INSERT INTO series (creator, category, subcategory, " . "name, frequency, query, is_public) VALUES " . - "($self->{'creator'}, " . - "$category_id, $subcategory_id, " . - $dbh->quote($self->{'name'}) . ", $self->{'frequency'}," . - $dbh->quote($self->{'query'}) . ", $self->{'public'})"); + "(?, ?, ?, ?, ?, ?, ?)", undef, + $self->{'creator'}, $category_id, $subcategory_id, $self->{'name'}, + $self->{'frequency'}, $self->{'query'}, $self->{'public'}); # Retrieve series_id $self->{'series_id'} = $dbh->selectrow_array("SELECT MAX(series_id) " . |