summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-04-10 08:18:16 +0200
committerlpsolit%gmail.com <>2005-04-10 08:18:16 +0200
commitc15ee7a4d566c9e4911ac0cc0e94edb8d357709d (patch)
tree5c84986f432a6da31e277c95e0da72bf9c8b3608
parentadd735039c2d148077d5a7baca1a36f50f5bfab3 (diff)
downloadbugzilla-c15ee7a4d566c9e4911ac0cc0e94edb8d357709d.tar.gz
bugzilla-c15ee7a4d566c9e4911ac0cc0e94edb8d357709d.tar.xz
Bug 225818: %FORM, %MFORM, and %COOKIE need to go away, in favor of the CGI methods - Patch by Teemu Mannermaa <wicked@etlicon.fi> r=LpSolit a=myk
-rw-r--r--Bugzilla/User.pm6
-rw-r--r--CGI.pl12
-rwxr-xr-xpost_bug.cgi6
-rwxr-xr-xprocess_bug.cgi14
-rw-r--r--template/en/default/filterexceptions.pl4
-rw-r--r--template/en/default/request/email.txt.tmpl5
6 files changed, 11 insertions, 36 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm
index 8cb4d5f99..ec3129b32 100644
--- a/Bugzilla/User.pm
+++ b/Bugzilla/User.pm
@@ -841,9 +841,6 @@ sub match_field {
$cgi->append(-name=>$field,
-values=>[@{$users}[0]->{'login'}]);
- # XXX FORM compatilibity code, will be removed in bug 225818
- $::FORM{$field} = join(" ", $cgi->param($field));
-
next;
}
@@ -857,9 +854,6 @@ sub match_field {
$cgi->append(-name=>$field,
-values=>[@{$users}[0]->{'login'}]);
- # XXX FORM compatilibity code, will be removed in bug 225818
- $::FORM{$field} = join(" ", $cgi->param($field));
-
$need_confirm = 1 if &::Param('confirmuniqueusermatch');
}
diff --git a/CGI.pl b/CGI.pl
index 7ac46ddd5..1295a5baf 100644
--- a/CGI.pl
+++ b/CGI.pl
@@ -401,18 +401,6 @@ use Bugzilla;
# XXX - mod_perl - reset this between runs
$::cgi = Bugzilla->cgi;
-# Set up stuff for compatibility with the old CGI.pl code
-# This code will be removed as soon as possible, in favour of
-# using the CGI.pm stuff directly
-
-# XXX - mod_perl - reset these between runs
-
-foreach my $name ($::cgi->param()) {
- my @val = $::cgi->param($name);
- $::FORM{$name} = join('', @val);
- $::MFORM{$name} = \@val;
-}
-
$::buffer = $::cgi->query_string();
# This could be needed in any CGI, so we set it here.
diff --git a/post_bug.cgi b/post_bug.cgi
index 218e3aaa7..0233fad83 100755
--- a/post_bug.cgi
+++ b/post_bug.cgi
@@ -111,7 +111,8 @@ my $component_id = get_component_id($product_id,
scalar($cgi->param('component')));
$component_id || ThrowUserError("require_component");
-if (!$cgi->param('short_desc') || trim($cgi->param('short_desc')) eq "") {
+if (!defined $cgi->param('short_desc')
+ || trim($cgi->param('short_desc')) eq "") {
ThrowUserError("require_summary");
}
@@ -163,7 +164,7 @@ if (Param("useqacontact")) {
if (UserInGroup("editbugs") || UserInGroup("canconfirm")) {
# Default to NEW if the user hasn't selected another status
- if (!$cgi->param('bug_status')) {
+ if (!defined $cgi->param('bug_status')) {
$cgi->param(-name => 'bug_status', -value => "NEW");
}
} else {
@@ -361,7 +362,6 @@ if (UserInGroup(Param("timetrackinggroup")) &&
if ((UserInGroup(Param("timetrackinggroup"))) && ($cgi->param('deadline'))) {
Bugzilla::Util::ValidateDate($cgi->param('deadline'), 'YYYY-MM-DD');
- my $str = $cgi->param('deadline');
$sql .= SqlQuote($cgi->param('deadline'));
} else {
$sql .= "NULL";
diff --git a/process_bug.cgi b/process_bug.cgi
index f85fd45d6..6f8303154 100755
--- a/process_bug.cgi
+++ b/process_bug.cgi
@@ -260,7 +260,7 @@ if (((defined $cgi->param('id') && $cgi->param('product') ne $oldproduct)
&& CheckonComment( "reassignbycomponent" ))
{
# Check to make sure they actually have the right to change the product
- if (!CheckCanChangeField('product', $cgi->param('id'), $oldproduct,
+ if (!CheckCanChangeField('product', scalar $cgi->param('id'), $oldproduct,
$cgi->param('product'))) {
$vars->{'oldvalue'} = $oldproduct;
$vars->{'newvalue'} = $cgi->param('product');
@@ -614,7 +614,7 @@ sub DoComma {
}
sub DoConfirm {
- if (CheckCanChangeField("canconfirm", $cgi->param('id'), 0, 1)) {
+ if (CheckCanChangeField("canconfirm", scalar $cgi->param('id'), 0, 1)) {
DoComma();
$::query .= "everconfirmed = 1";
}
@@ -1301,8 +1301,7 @@ foreach my $id (@idlist) {
{ product => $oldhash{'product'} });
}
- if (defined $cgi->param('product')
- && $cgi->param('product') ne $cgi->param('dontchange')
+ if ($cgi->param('product') ne $cgi->param('dontchange')
&& $cgi->param('product') ne $oldhash{'product'}
&& !CanEnterProduct($cgi->param('product'))) {
ThrowUserError("entry_access_denied",
@@ -1494,9 +1493,7 @@ foreach my $id (@idlist) {
}
my $newproduct_id = $oldhash{'product_id'};
- if ((defined $cgi->param('product'))
- && ($cgi->param('product') ne $cgi->param('dontchange')))
- {
+ if ($cgi->param('product') ne $cgi->param('dontchange')) {
my $newproduct_id = get_product_id($cgi->param('product'));
}
@@ -1648,8 +1645,7 @@ foreach my $id (@idlist) {
# conditions under which these activities take place, more information
# about which can be found in comments within the conditionals below.
# Check if the user has changed the product to which the bug belongs;
- if (defined $cgi->param('product')
- && $cgi->param('product') ne $cgi->param('dontchange')
+ if ($cgi->param('product') ne $cgi->param('dontchange')
&& $cgi->param('product') ne $oldhash{'product'}
) {
$newproduct_id = get_product_id($cgi->param('product'));
diff --git a/template/en/default/filterexceptions.pl b/template/en/default/filterexceptions.pl
index 7b7ba5134..c669b2e15 100644
--- a/template/en/default/filterexceptions.pl
+++ b/template/en/default/filterexceptions.pl
@@ -417,10 +417,6 @@
'linktext.$type',
],
-'bug/create/comment.txt.tmpl' => [
- 'form.comment',
-],
-
'bug/create/create.html.tmpl' => [
'g.bit',
'g.description',
diff --git a/template/en/default/request/email.txt.tmpl b/template/en/default/request/email.txt.tmpl
index 569688cef..d59cad0ec 100644
--- a/template/en/default/request/email.txt.tmpl
+++ b/template/en/default/request/email.txt.tmpl
@@ -62,9 +62,10 @@ Attachment [% attidsummary %]
[%- END %]
[%- FILTER bullet = wrap(80) %]
-[% IF form.comment.length > 0 %]
+[% USE Bugzilla %]
+[% IF Bugzilla.cgi.param("comment").length > 0 %]
------- Additional Comments from [% user.identity %]
-[%+ form.comment %]
+[%+ Bugzilla.cgi.param("comment") %]
[% END %]
[%- END %]