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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
a0951fc9
Commit
a0951fc9
authored
Sep 11, 2001
by
gerv%gerv.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make Bugzilla support <link> tag for buglists. Bug 87818. r=jake, caillon.
parent
c58ca9fb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
2 deletions
+45
-2
CGI.pl
CGI.pl
+43
-0
buglist.cgi
buglist.cgi
+1
-1
show_bug.cgi
show_bug.cgi
+1
-1
No files found.
CGI.pl
View file @
a0951fc9
...
...
@@ -22,6 +22,7 @@
# Joe Robins <jmrobins@tgix.com>
# Dave Miller <justdave@syndicomm.com>
# Christopher Aillon <christopher@aillon.com>
# Gervase Markham <gerv@gerv.net>
# Contains some global routines used throughout the CGI scripts of Bugzilla.
...
...
@@ -408,6 +409,48 @@ sub navigation_header {
print
" <A HREF=enter_bug.cgi>Enter new bug</A>\n"
}
# Adds <link> elements for bug lists. These can be inserted into the header by
# (ab)using the "jscript" parameter to PutHeader, which inserts an arbitrary
# string into the header. This function is modelled on the one above.
sub
navigation_links
($)
{
my
(
$buglist
)
=
@_
;
my
$retval
=
""
;
# We need to be able to pass in a buglist because when you sort on a column
# the bugs in the cookie you are given will still be in the old order.
# If a buglist isn't passed, we just use the cookie.
$buglist
||=
$::COOKIE
{
"BUGLIST"
};
if
(
defined
$buglist
&&
$buglist
ne
""
)
{
my
@bugs
=
split
(
/:/
,
$buglist
);
if
(
defined
$::FORM
{
'id'
})
{
# We are on an individual bug
my
$cur
=
lsearch
(
\
@bugs
,
$::FORM
{
"id"
});
if
(
$cur
>
0
)
{
$retval
.=
"<link rel=\"First\" href=\"show_bug.cgi?id=$bugs[0]\" />\n"
;
$retval
.=
"<link rel=\"Prev\" href=\"show_bug.cgi?id=$bugs[$cur - 1]\" />\n"
;
}
if
(
$cur
<
$#bugs
)
{
$retval
.=
"<link rel=\"Next\" href=\"show_bug.cgi?id=$bugs[$cur + 1]\" />\n"
;
$retval
.=
"<link rel=\"Last\" href=\"show_bug.cgi?id=$bugs[$#bugs]\" />\n"
;
}
$retval
.=
"<link rel=\"Up\" href=\"buglist.cgi?regetlastlist=1\" />\n"
;
$retval
.=
"<link rel=\"Contents\" href=\"buglist.cgi?regetlastlist=1\" />\n"
;
}
else
{
# We are on a bug list
$retval
.=
"<link rel=\"First\" href=\"show_bug.cgi?id=$bugs[0]\" />\n"
;
$retval
.=
"<link rel=\"Next\" href=\"show_bug.cgi?id=$bugs[0]\" />\n"
;
$retval
.=
"<link rel=\"Last\" href=\"show_bug.cgi?id=$bugs[$#bugs]\" />\n"
;
}
}
return
$retval
;
}
sub
make_checkboxes
{
my
(
$src
,
$default
,
$isregexp
,
$name
)
=
(
@_
);
my
$last
=
""
;
...
...
buglist.cgi
View file @
a0951fc9
...
...
@@ -1313,7 +1313,7 @@ if (length($buglist) < 4000) {
print
"Set-Cookie: BUGLIST=\n\n"
;
$toolong
=
1
;
}
PutHeader
(
$::querytitle
);
PutHeader
(
$::querytitle
,
undef
,
""
,
""
,
navigation_links
(
$buglist
)
);
print
"
...
...
show_bug.cgi
View file @
a0951fc9
...
...
@@ -68,7 +68,7 @@ GetVersionTable();
SendSQL
(
"SELECT short_desc FROM bugs WHERE bug_id = $::FORM{'id'}"
);
my
(
$summary
)
=
FetchSQLData
();
$summary
=
html_quote
(
$summary
);
PutHeader
(
"Bug $::FORM{'id'} - $summary"
,
"Bugzilla Bug $::FORM{'id'}"
,
$summary
);
PutHeader
(
"Bug $::FORM{'id'} - $summary"
,
"Bugzilla Bug $::FORM{'id'}"
,
$summary
,
""
,
navigation_links
()
);
navigation_header
();
...
...
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