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
0fc5ea12
Commit
0fc5ea12
authored
Jun 23, 1999
by
terry%mozilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make attachments remember who submitted that attachment.
parent
97dbac08
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
1 deletion
+45
-1
CHANGES
CHANGES
+42
-0
createattachment.cgi
createattachment.cgi
+2
-1
makeattachmenttable.sh
makeattachmenttable.sh
+1
-0
No files found.
CHANGES
View file @
0fc5ea12
...
...
@@ -10,6 +10,48 @@ query the CVS tree. For example,
will tell you what has been changed in the last week.
6/22/99 Added an entry to the attachments table to record who the submitter
was. Nothing uses this yet, but it still should be recorded.
alter table attachments add column submitter_id mediumint not null;
You should also run this script to populate the new field:
#!/usr/bonsaitools/bin/perl -w
use diagnostics;
use strict;
require "globals.pl";
$|=1;
ConnectToDatabase();
SendSQL("select bug_id, attach_id from attachments order by bug_id");
my @list;
while (MoreSQLData()) {
my @row = FetchSQLData();
push(@list, \@row);
}
foreach my $ref (@list) {
my ($bug, $attach) = (@$ref);
SendSQL("select long_desc from bugs where bug_id = $bug");
my $comment = FetchOneColumn() . "Created an attachment (id=$attach)";
if ($comment =~ m@-* Additional Comments From ([^ ]*)[- 0-9/:]*\nCreated an attachment \(id=$attach\)@) {
print "Found $1\n";
SendSQL("select userid from profiles where login_name=" .
SqlQuote($1));
my $userid = FetchOneColumn();
if (defined $userid && $userid > 0) {
SendSQL("update attachments set submitter_id=$userid where attach_id = $attach");
}
} else {
print "Bug $bug can't find comment for attachment $attach\n";
}
}
6/14/99 Added "BeOS" to the list of OS's. Feed this to mysql:
alter table bugs change column op_sys op_sys enum("All", "Windows 3.1", "Windows 95", "Windows 98", "Windows NT", "Mac System 7", "Mac System 7.5", "Mac System 7.6.1", "Mac System 8.0", "Mac System 8.5", "Mac System 8.6", "AIX", "BSDI", "HP-UX", "IRIX", "Linux", "FreeBSD", "OSF/1", "Solaris", "SunOS", "Neutrino", "OS/2", "BeOS", "other") not null;
...
...
createattachment.cgi
View file @
0fc5ea12
...
...
@@ -89,9 +89,10 @@ What kind of file is this?
if
(
$mimetype
!~
m@^(\w|-)+/(\w|-)+$@
)
{
Punt
(
"You must select a legal mime type. '<tt>$mimetype</tt>' simply will not do."
);
}
SendSQL
(
"insert into attachments (bug_id, filename, description, mimetype, ispatch, thedata) values ($id,"
.
SendSQL
(
"insert into attachments (bug_id, filename, description, mimetype, ispatch,
submitter_id,
thedata) values ($id,"
.
SqlQuote
(
$::FILENAME
{
'data'
})
.
", "
.
SqlQuote
(
$desc
)
.
", "
.
SqlQuote
(
$mimetype
)
.
", $ispatch, "
.
DBNameToIdAndCheck
(
$::COOKIE
{
'Bugzilla_login'
})
.
", "
.
SqlQuote
(
$::FORM
{
'data'
})
.
")"
);
SendSQL
(
"select LAST_INSERT_ID()"
);
my
$attachid
=
FetchOneColumn
();
...
...
makeattachmenttable.sh
View file @
0fc5ea12
...
...
@@ -37,6 +37,7 @@ mimetype mediumtext not null,
ispatch tinyint,
filename mediumtext not null,
thedata longblob not null,
submitter_id mediumint not null,
index(bug_id),
index(creation_ts)
...
...
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