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
da34d05d
Commit
da34d05d
authored
Oct 16, 2001
by
gerv%gerv.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 30480 - add 'show dependencies as buglist' links. Patch by gerv, r=myk, kiko.
parent
ddd4b5c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
showdependencytree.cgi
showdependencytree.cgi
+14
-4
No files found.
showdependencytree.cgi
View file @
da34d05d
...
...
@@ -28,8 +28,6 @@ use strict;
use
lib
qw(.)
;
require
"CGI.pl"
;
# Shut up misguided -w warnings about "used only once":
use
vars
%::
FORM
;
ConnectToDatabase
();
...
...
@@ -63,6 +61,9 @@ if ($hide_resolved !~ /^\d+$/ || $hide_resolved != 1) { $hide_resolved = 0 };
# A hash to count visited bugs, and also to avoid processing repeated bugs
my
%
seen
;
# A hash to keep track of the bugs we print for the 'as buglist' links.
my
%
printed
;
# HTML output generated in the parse of the dependency tree. This is a
# global only to avoid excessive complication in the recursion invocation
my
$html
;
...
...
@@ -92,6 +93,7 @@ my $scriptname = $::ENV{'SCRIPT_NAME'}; # showdependencytree.cgi
# html: Bug descriptions are appended here
# realdepth: We set the maximum depth of recursion reached
# seen: We store the bugs analyzed so far
# printed: We store those bugs we actually print, for the "buglist" link
# Globals Referenced
# maxdepth
# hide_resolved
...
...
@@ -161,6 +163,8 @@ sub DumpKids {
$short_desc.</a>\n|
;
}
if
(
!
$opened
)
{
$html
.=
"</span></strike>"
;
}
$printed
{
$kid
}
=
1
;
}
# End hideable output
# Store the maximum depth so far
...
...
@@ -197,6 +201,7 @@ sub makeTreeHTML {
# Clean up globals for this run
$html
=
""
;
%
seen
=
();
%
printed
=
();
DumpKids
(
$i
,
$target
);
my
$tmphtml
=
$html
;
...
...
@@ -205,6 +210,11 @@ sub makeTreeHTML {
$html
=
"<h3>Bugs that bug $linked_id "
.
(
$target
eq
"blocked"
?
"blocks"
:
"depends on"
);
if
((
scalar
keys
%
printed
)
>
0
)
{
$html
.=
' (<a href="buglist.cgi?bug_id='
.
join
(
','
,
keys
%
printed
)
.
'">view as bug list</a>)'
;
}
# Provide feedback for omitted bugs
if
(
$maxdepth
||
$hide_resolved
)
{
$html
.=
" <small><b>(Only "
;
...
...
@@ -218,7 +228,7 @@ sub makeTreeHTML {
$html
.=
$tmphtml
;
# If no bugs were found, say so
if
((
scalar
keys
%
seen
)
<
2
)
{
if
((
scalar
keys
%
printed
)
==
0
)
{
$html
.=
" None<p>\n"
;
}
...
...
@@ -296,7 +306,7 @@ sub drawDepForm {
<form method="get" action="$scriptname"
style="display: inline; margin: 0px;">
<!-- Limit entry form: the button can
'
t do anything when total depth
<!-- Limit entry form: the button can
no
t do anything when total depth
is less than two, so disable it -->
<input name="maxdepth" size="4" maxlength="4" value="|
.
(
$maxdepth
>
0
?
$maxdepth
:
""
)
.
qq|">
...
...
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