Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
951d8c39
Commit
951d8c39
authored
Apr 07, 2004
by
kiko%async.com.br
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for bug 238862: remove %FORM and %COOKIE from enter_bug.cgi. Does
that, and also fixes up the bug creation template. r=justdave, a=justdave.
parent
abcd7bf1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
18 deletions
+16
-18
enter_bug.cgi
enter_bug.cgi
+14
-17
create.html.tmpl
template/en/default/bug/create/create.html.tmpl
+2
-1
No files found.
enter_bug.cgi
View file @
951d8c39
...
...
@@ -44,7 +44,6 @@ use vars qw(
$unconfirmedstate
$template
$vars
%COOKIE
@enterable_products
@legal_opsys
@legal_platform
...
...
@@ -52,7 +51,6 @@ use vars qw(
@legal_severity
@legal_keywords
$userid
%MFORM
%versions
$proddesc
)
;
...
...
@@ -63,7 +61,9 @@ Bugzilla->login(LOGIN_REQUIRED) if AnyEntryGroups();
my
$cgi
=
Bugzilla
->
cgi
;
if
(
!
defined
$::FORM
{
'product'
})
{
my
$product
=
$cgi
->
param
(
'product'
);
if
(
!
defined
$product
)
{
GetVersionTable
();
Bugzilla
->
login
();
...
...
@@ -84,27 +84,24 @@ if (!defined $::FORM{'product'}) {
$vars
->
{
'proddesc'
}
=
\%
products
;
$vars
->
{
'target'
}
=
"enter_bug.cgi"
;
$vars
->
{
'format'
}
=
$
::FORM
{
'format'
}
;
$vars
->
{
'format'
}
=
$
cgi
->
param
(
'format'
)
;
print
$cgi
->
header
();
$template
->
process
(
"global/choose-product.html.tmpl"
,
$vars
)
||
ThrowTemplateError
(
$template
->
error
());
exit
;
}
else
{
# Only one product exists
$product
=
(
keys
%
products
)[
0
];
}
$::FORM
{
'product'
}
=
(
keys
%
products
)[
0
];
$::MFORM
{
'product'
}
=
[
$::FORM
{
'product'
}];
}
my
$product
=
$::FORM
{
'product'
};
##############################################################################
# Useful Subroutines
##############################################################################
sub
formvalue
{
my
(
$name
,
$default
)
=
(
@_
);
return
$
::FORM
{
$name
}
||
$default
||
""
;
return
$
cgi
->
param
(
$name
)
||
$default
||
""
;
}
sub
pickplatform
{
...
...
@@ -242,7 +239,7 @@ if (0 == @{$::components{$product}}) {
}
elsif
(
1
==
@
{
$::components
{
$product
}})
{
# Only one component; just pick it.
$
::FORM
{
'component'
}
=
$::components
{
$product
}
->
[
0
]
;
$
cgi
->
param
(
'component'
,
$::components
{
$product
}
->
[
0
])
;
}
my
@components
;
...
...
@@ -268,7 +265,6 @@ $default{'component_'} = formvalue('component');
$vars
->
{
'assigned_to'
}
=
formvalue
(
'assigned_to'
);
$vars
->
{
'cc'
}
=
formvalue
(
'cc'
);
$vars
->
{
'reporter'
}
=
$::COOKIE
{
'Bugzilla_login'
};
$vars
->
{
'product'
}
=
$product
;
$vars
->
{
'bug_file_loc'
}
=
formvalue
(
'bug_file_loc'
,
"http://"
);
$vars
->
{
'short_desc'
}
=
formvalue
(
'short_desc'
);
...
...
@@ -299,9 +295,9 @@ $vars->{'blocked'} = formvalue('blocked');
$vars
->
{
'version'
}
=
$::versions
{
$product
}
||
[]
;
if
(
formvalue
(
'version'
))
{
$default
{
'version'
}
=
formvalue
(
'version'
);
}
elsif
(
exists
$::COOKIE
{
"VERSION-$product"
}
&&
lsearch
(
$vars
->
{
'version'
},
$
::COOKIE
{
"VERSION-$product"
}
)
!=
-
1
)
{
$default
{
'version'
}
=
$
::COOKIE
{
"VERSION-$product"
}
;
}
elsif
(
defined
$cgi
->
cookie
(
"VERSION-$product"
)
&&
lsearch
(
$vars
->
{
'version'
},
$
cgi
->
cookie
(
"VERSION-$product"
)
)
!=
-
1
)
{
$default
{
'version'
}
=
$
cgi
->
cookie
(
"VERSION-$product"
)
;
}
else
{
$default
{
'version'
}
=
$vars
->
{
'version'
}
->
[
$#
{
$vars
->
{
'version'
}}];
}
...
...
@@ -370,7 +366,8 @@ $vars->{'default'} = \%default;
$vars
->
{
'use_keywords'
}
=
1
if
(
@::legal_keywords
);
my
$format
=
GetFormat
(
"bug/create/create"
,
$::FORM
{
'format'
},
$::FORM
{
'ctype'
});
GetFormat
(
"bug/create/create"
,
scalar
$cgi
->
param
(
'format'
),
scalar
$cgi
->
param
(
'ctype'
));
print
$cgi
->
header
(
$format
->
{
'ctype'
});
$template
->
process
(
$format
->
{
'template'
},
$vars
)
...
...
template/en/default/bug/create/create.html.tmpl
View file @
951d8c39
...
...
@@ -27,6 +27,7 @@
h2 = "This page lets you enter a new $terms.bug into ${terms.Bugzilla}."
onload="set_assign_to();"
%]
[% USE Bugzilla %]
<script type="text/javascript" language="JavaScript">
<!--
...
...
@@ -91,7 +92,7 @@ function set_assign_to() {
<tr>
<td align="right" valign="top"><strong>Reporter:</strong></td>
<td valign="top">[%
reporter
FILTER html %]</td>
<td valign="top">[%
Bugzilla.user.login
FILTER html %]</td>
<td align="right" valign="top"><strong>Product:</strong></td>
<td valign="top">[% product FILTER html %]</td>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment