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
bea873a6
Commit
bea873a6
authored
Jul 25, 2006
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 344527: Old Charts are broken using mod_perl
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=justdave
parent
788586bb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
4 deletions
+28
-4
Util.pm
Bugzilla/Util.pm
+24
-2
reports.cgi
reports.cgi
+4
-2
No files found.
Bugzilla/Util.pm
View file @
bea873a6
...
...
@@ -34,7 +34,7 @@ use base qw(Exporter);
detaint_signed
html_quote url_quote value_quote xml_quote
css_class_quote
i_am_cgi get_netaddr
i_am_cgi get_netaddr
correct_urlbase
lsearch
diff_arrays diff_strings
trim wrap_comment find_wrap_point
...
...
@@ -146,6 +146,22 @@ sub i_am_cgi {
return
exists
$ENV
{
'SERVER_SOFTWARE'
}
?
1
:
0
;
}
sub
correct_urlbase
{
my
$ssl
=
Bugzilla
->
params
->
{
'ssl'
};
return
Bugzilla
->
params
->
{
'urlbase'
}
if
$ssl
eq
'never'
;
my
$sslbase
=
Bugzilla
->
params
->
{
'sslbase'
};
if
(
$sslbase
)
{
return
$sslbase
if
$ssl
eq
'always'
;
# Authenticated Sessions
return
$sslbase
if
Bugzilla
->
user
->
id
;
}
# Set to "authenticated sessions" but nobody's logged in, or
# sslbase isn't set.
return
Bugzilla
->
params
->
{
'urlbase'
};
}
sub
lsearch
{
my
(
$list
,
$item
)
=
(
@_
);
my
$count
=
0
;
...
...
@@ -430,7 +446,8 @@ Bugzilla::Util - Generic utility functions for bugzilla
# Functions that tell you about your environment
my $is_cgi = i_am_cgi();
$net_addr = get_netaddr($ip_addr);
my $net_addr = get_netaddr($ip_addr);
my $urlbase = correct_urlbase();
# Functions for searching
$loc = lsearch(\@arr, $val);
...
...
@@ -565,6 +582,11 @@ C<Bugzilla->params->{'loginnetmask'}> as the netmask. This can be used
to obtain data in order to restrict weak authentication methods (such as
cookies) to only some addresses.
=item C<correct_urlbase()>
Returns either the C<sslbase> or C<urlbase> parameter, depending on the
current setting for the C<ssl> parameter.
=back
=head2 Searching
...
...
reports.cgi
View file @
bea873a6
...
...
@@ -48,7 +48,8 @@ eval "use Chart::Lines";
$@
&&
ThrowCodeError
(
"chart_lines_not_installed"
);
local
our
$dir
=
bz_locations
()
->
{
'datadir'
}
.
"/mining"
;
local
our
$graph_dir
=
bz_locations
()
->
{
'libpath'
}
.
"/graphs"
;
local
our
$graph_url
=
'graphs'
;
local
our
$graph_dir
=
bz_locations
()
->
{
'libpath'
}
.
'/'
.
$graph_url
;
# If we're using bug groups for products, we should apply those restrictions
# to viewing reports, as well. Time to check the login in that case.
...
...
@@ -198,7 +199,8 @@ FIN
my
$type
=
chart_image_type
();
my
$data_file
=
daily_stats_filename
(
$product
);
my
$image_file
=
chart_image_name
(
$data_file
,
$type
,
$datasets
);
my
$url_image
=
"$graph_dir/"
.
url_quote
(
$image_file
);
my
$url_image
=
correct_urlbase
()
.
"$graph_url/"
.
url_quote
(
$image_file
);
if
(
!
-
e
"$graph_dir/$image_file"
)
{
generate_chart
(
"$dir/$data_file"
,
"$graph_dir/$image_file"
,
$type
,
...
...
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