From 7072d6a673f9a05b688d07e05980b7932c7abbe6 Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Fri, 14 May 2010 07:25:05 -0700 Subject: Bug 561296: A fix allowing updating a field value's name when it is the default value r=LpSolit, a=LpSolit --- Bugzilla/CGI.pm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Bugzilla/CGI.pm') diff --git a/Bugzilla/CGI.pm b/Bugzilla/CGI.pm index 75b7f18d7..00f23c393 100644 --- a/Bugzilla/CGI.pm +++ b/Bugzilla/CGI.pm @@ -329,6 +329,14 @@ sub _fix_utf8 { return $input; } +sub should_set { + my ($self, $param) = @_; + my $set = (defined $self->param($param) + or defined $self->param("defined_$param")) + ? 1 : 0; + return $set; +} + # The various parts of Bugzilla which create cookies don't want to have to # pass them around to all of the callers. Instead, store them locally here, # and then output as required from |header|. -- cgit v1.2.3-24-g4f1b