summaryrefslogtreecommitdiffstats
path: root/attachment.cgi
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-09-06 05:41:20 +0200
committerlpsolit%gmail.com <>2005-09-06 05:41:20 +0200
commit3223b9f1872063b0c1ba864880449e40c68d590d (patch)
tree53446ca60ec5aafe33236b979f24a8d57dc009a7 /attachment.cgi
parentd14f5d4e1330aa4efee97b7b83381619980a6819 (diff)
downloadbugzilla-3223b9f1872063b0c1ba864880449e40c68d590d.tar.gz
bugzilla-3223b9f1872063b0c1ba864880449e40c68d590d.tar.xz
Bug 304745: Move GetFieldID() out of globals.pl - Patch by Frédéric Buclin <LpSolit@gmail.com> r=wicked a=justdave
Diffstat (limited to 'attachment.cgi')
-rwxr-xr-xattachment.cgi17
1 files changed, 9 insertions, 8 deletions
diff --git a/attachment.cgi b/attachment.cgi
index c406516a3..67272ae50 100755
--- a/attachment.cgi
+++ b/attachment.cgi
@@ -48,6 +48,7 @@ use Bugzilla::FlagType;
use Bugzilla::User;
use Bugzilla::Util;
use Bugzilla::Bug;
+use Bugzilla::Field;
Bugzilla->login();
@@ -1008,7 +1009,7 @@ sub insert
AppendComment($bugid, $userid, $comment, $isprivate, $timestamp);
# Make existing attachments obsolete.
- my $fieldid = GetFieldID('attachments.isobsolete');
+ my $fieldid = get_field_id('attachments.isobsolete');
foreach my $obsolete_id (@obsolete_ids) {
# If the obsolete attachment has request flags, cancel them.
# This call must be done before updating the 'attachments' table.
@@ -1057,7 +1058,7 @@ sub insert
# Add the changes to the bugs_activity table
for (my $i = 0; $i < 3; $i++) {
if ($oldvalues[$i] ne $newvalues[$i]) {
- my $fieldid = GetFieldID($fields[$i]);
+ my $fieldid = get_field_id($fields[$i]);
SendSQL("INSERT INTO bugs_activity " .
"(bug_id, who, bug_when, fieldid, removed, added) " .
"VALUES ($bugid, $userid, $sql_timestamp, " .
@@ -1233,7 +1234,7 @@ sub update
my $sql_timestamp = SqlQuote($timestamp);
if ($olddescription ne $cgi->param('description')) {
my $quotedolddescription = SqlQuote($olddescription);
- my $fieldid = GetFieldID('attachments.description');
+ my $fieldid = get_field_id('attachments.description');
SendSQL("INSERT INTO bugs_activity (bug_id, attach_id, who, bug_when,
fieldid, removed, added)
VALUES ($bugid, $attach_id, $userid, $sql_timestamp, $fieldid,
@@ -1241,7 +1242,7 @@ sub update
}
if ($oldcontenttype ne $cgi->param('contenttype')) {
my $quotedoldcontenttype = SqlQuote($oldcontenttype);
- my $fieldid = GetFieldID('attachments.mimetype');
+ my $fieldid = get_field_id('attachments.mimetype');
SendSQL("INSERT INTO bugs_activity (bug_id, attach_id, who, bug_when,
fieldid, removed, added)
VALUES ($bugid, $attach_id, $userid, $sql_timestamp, $fieldid,
@@ -1249,28 +1250,28 @@ sub update
}
if ($oldfilename ne $cgi->param('filename')) {
my $quotedoldfilename = SqlQuote($oldfilename);
- my $fieldid = GetFieldID('attachments.filename');
+ my $fieldid = get_field_id('attachments.filename');
SendSQL("INSERT INTO bugs_activity (bug_id, attach_id, who, bug_when,
fieldid, removed, added)
VALUES ($bugid, $attach_id, $userid, $sql_timestamp, $fieldid,
$quotedoldfilename, $quotedfilename)");
}
if ($oldispatch ne $cgi->param('ispatch')) {
- my $fieldid = GetFieldID('attachments.ispatch');
+ my $fieldid = get_field_id('attachments.ispatch');
SendSQL("INSERT INTO bugs_activity (bug_id, attach_id, who, bug_when,
fieldid, removed, added)
VALUES ($bugid, $attach_id, $userid, $sql_timestamp, $fieldid,
$oldispatch, " . $cgi->param('ispatch') . ")");
}
if ($oldisobsolete ne $cgi->param('isobsolete')) {
- my $fieldid = GetFieldID('attachments.isobsolete');
+ my $fieldid = get_field_id('attachments.isobsolete');
SendSQL("INSERT INTO bugs_activity (bug_id, attach_id, who, bug_when,
fieldid, removed, added)
VALUES ($bugid, $attach_id, $userid, $sql_timestamp, $fieldid,
$oldisobsolete, " . $cgi->param('isobsolete') . ")");
}
if ($oldisprivate ne $cgi->param('isprivate')) {
- my $fieldid = GetFieldID('attachments.isprivate');
+ my $fieldid = get_field_id('attachments.isprivate');
SendSQL("INSERT INTO bugs_activity (bug_id, attach_id, who, bug_when,
fieldid, removed, added)
VALUES ($bugid, $attach_id, $userid, $sql_timestamp, $fieldid,