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
324ea8a4
Commit
324ea8a4
authored
Sep 29, 2012
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 793893: Tabular reports crash when no format parameter is defined
r=glob a=LpSolit
parent
dfa185b3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
8 deletions
+6
-8
report.cgi
report.cgi
+4
-5
filterexceptions.pl
template/en/default/filterexceptions.pl
+0
-1
report.html.tmpl
template/en/default/reports/report.html.tmpl
+2
-2
No files found.
report.cgi
View file @
324ea8a4
...
...
@@ -117,10 +117,12 @@ $width <= 2000 || ThrowUserError("chart_too_large");
||
ThrowCodeError
(
"invalid_dimensions"
);
$height
<=
2000
||
ThrowUserError
(
"chart_too_large"
);
my
$formatparam
=
$cgi
->
param
(
'format'
)
||
''
;
# These shenanigans are necessary to make sure that both vertical and
# horizontal 1D tables convert to the correct dimension when you ask to
# display them as some sort of chart.
if
(
defined
$cgi
->
param
(
'format'
)
&&
$cgi
->
param
(
'format'
)
eq
"table"
)
{
if
(
$formatparam
eq
"table"
)
{
if
(
$col_field
&&
!
$row_field
)
{
# 1D *tables* should be displayed vertically (with a row_field only)
$row_field
=
$col_field
;
...
...
@@ -243,7 +245,7 @@ $vars->{'row_names'} = \@row_names;
$vars
->
{
'tbl_names'
}
=
\
@tbl_names
;
# Below a certain width, we don't see any bars, so there needs to be a minimum.
if
(
$
cgi
->
param
(
'format'
)
eq
"bar"
)
{
if
(
$
formatparam
eq
"bar"
)
{
my
$min_width
=
(
scalar
(
@col_names
)
||
1
)
*
20
;
if
(
!
$cgi
->
param
(
'cumulate'
))
{
...
...
@@ -259,8 +261,6 @@ $vars->{'query'} = $query;
$vars
->
{
'saved_report_id'
}
=
$cgi
->
param
(
'saved_report_id'
);
$vars
->
{
'debug'
}
=
$cgi
->
param
(
'debug'
);
my
$formatparam
=
$cgi
->
param
(
'format'
);
if
(
$action
eq
"wrap"
)
{
# So which template are we using? If action is "wrap", we will be using
# no format (it gets passed through to be the format of the actual data),
...
...
@@ -269,7 +269,6 @@ if ($action eq "wrap") {
# data, or images generated by calling report.cgi again with action as
# "plot".
$formatparam
=~
s/[^a-zA-Z\-]//g
;
trick_taint
(
$formatparam
);
$vars
->
{
'format'
}
=
$formatparam
;
$formatparam
=
''
;
...
...
template/en/default/filterexceptions.pl
View file @
324ea8a4
...
...
@@ -90,7 +90,6 @@
'formaturl'
,
'other_format.name'
,
'switchbase'
,
'format'
,
'cumulate'
,
],
...
...
template/en/default/reports/report.html.tmpl
View file @
324ea8a4
...
...
@@ -123,7 +123,7 @@
<a href="query.cgi?[% switchbase %]&format=report-table">Edit this report</a>
[% ELSE %]
<a href="query.cgi?[% switchbase %]&chart_format=
[%~ format %]&format=report-graph&cumulate=[% cumulate %]">
[%~ format
FILTER uri
%]&format=report-graph&cumulate=[% cumulate %]">
Edit this report</a>
[% END %]
</td>
...
...
@@ -135,7 +135,7 @@
[% ELSE %]
<form method="get" action="report.cgi">
<input type="submit" id="remember" value="Remember report"> as
<input type="hidden" name="query" value="[% switchbase %]&format=[% format FILTER
html
%]&action=wrap">
<input type="hidden" name="query" value="[% switchbase %]&format=[% format FILTER
uri
%]&action=wrap">
<input type="hidden" name="action" value="add">
<input type="hidden" name="token" value="[% issue_hash_token(['save_report']) FILTER html %]">
<input type="text" id="name" name="name" size="20" value="" maxlength="64">
...
...
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