aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-02-25 07:42:47 +0000
committermkanat%kerio.com <>2005-02-25 07:42:47 +0000
commitfa9b63f55b3118a30ff641d0e386266eb877e258 (patch)
treea388e3577fef067abe83e94bbdb52428e442b35b /editcomponents.cgi
parentBug 280500: Replace "DATE_FORMAT()" with Bugzilla::DB function call (diff)
downloadbugzilla-fa9b63f55b3118a30ff641d0e386266eb877e258.tar.gz
bugzilla-fa9b63f55b3118a30ff641d0e386266eb877e258.tar.bz2
bugzilla-fa9b63f55b3118a30ff641d0e386266eb877e258.zip
Bug 283237: Move DBname_to_id out of globals.pl
Patch By Max Kanat-Alexander <mkanat@kerio.com> r=wurblzap, a=myk
Diffstat (limited to 'editcomponents.cgi')
-rwxr-xr-xeditcomponents.cgi9
1 files changed, 5 insertions, 4 deletions
diff --git a/editcomponents.cgi b/editcomponents.cgi
index 08cfab14c..12a25905d 100755
--- a/editcomponents.cgi
+++ b/editcomponents.cgi
@@ -35,6 +35,7 @@ use Bugzilla::Constants;
use Bugzilla::Config qw(:DEFAULT $datadir);
use Bugzilla::Series;
use Bugzilla::Util;
+use Bugzilla::User;
use vars qw($template $vars);
@@ -296,7 +297,7 @@ if ($action eq 'new') {
exit;
}
- my $initialownerid = DBname_to_id ($initialowner);
+ my $initialownerid = login_to_id ($initialowner);
if (!$initialownerid) {
ThrowUserError('component_need_valid_initialowner',
{'name' => $component});
@@ -304,7 +305,7 @@ if ($action eq 'new') {
}
my $initialqacontact = trim($cgi->param('initialqacontact') || '');
- my $initialqacontactid = DBname_to_id ($initialqacontact);
+ my $initialqacontactid = login_to_id ($initialqacontact);
if (Param('useqacontact')) {
if (!$initialqacontactid && $initialqacontact ne '') {
ThrowUserError('component_need_valid_initialqacontact',
@@ -600,7 +601,7 @@ if ($action eq 'update') {
if ($initialowner ne $initialownerold) {
- my $initialownerid = DBname_to_id($initialowner);
+ my $initialownerid = login_to_id($initialowner);
unless ($initialownerid) {
$dbh->bz_unlock_tables(UNLOCK_ABORT);
ThrowUserError('component_need_valid_initialowner',
@@ -618,7 +619,7 @@ if ($action eq 'update') {
}
if (Param('useqacontact') && $initialqacontact ne $initialqacontactold) {
- my $initialqacontactid = DBname_to_id($initialqacontact);
+ my $initialqacontactid = login_to_id($initialqacontact);
if (!$initialqacontactid && $initialqacontact ne '') {
$dbh->bz_unlock_tables(UNLOCK_ABORT);
ThrowUserError('component_need_valid_initialqacontact',