]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 225818: %FORM, %MFORM, and %COOKIE need to go away, in favor of the CGI methods...
authorlpsolit%gmail.com <>
Sun, 10 Apr 2005 06:18:16 +0000 (06:18 +0000)
committerlpsolit%gmail.com <>
Sun, 10 Apr 2005 06:18:16 +0000 (06:18 +0000)
Bugzilla/User.pm
CGI.pl
post_bug.cgi
process_bug.cgi
template/en/default/filterexceptions.pl
template/en/default/request/email.txt.tmpl

index 8cb4d5f997539f55ef0a59e8bcead22627f5f8fb..ec3129b320ca1ce6930f02de9439e63b7ebb9488 100644 (file)
@@ -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 7ac46ddd50bbd984f67e134541d0e80481ea9e9d..1295a5baf39cd8943a21b3a87a24a0e813abd7c6 100644 (file)
--- 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.
index 218e3aaa726e9ecf1be971e1392a13c7b6704d4e..0233fad83667407bb28bbcbed6a2a95cd741702c 100755 (executable)
@@ -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";
index f85fd45d63fa7df18c516896434189de415140aa..6f83031546e2797af15594373b58a4e6447d1bc0 100755 (executable)
@@ -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'));
index 7b7ba5134fc24485f10a9b448dddaf9f4c169589..c669b2e151a1ac796b7713d4592186ab960b5cd7 100644 (file)
   'linktext.$type',
 ],
 
-'bug/create/comment.txt.tmpl' => [
-  'form.comment', 
-],
-
 'bug/create/create.html.tmpl' => [
   'g.bit',
   'g.description',
index 569688cef7ecf272a0ab24d7287031e8052ef583..d59cad0ec5907ee7c2fb131b6cfddb62318ac57d 100644 (file)
@@ -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 %]