diff options
author | mkanat%kerio.com <> | 2005-02-25 07:42:47 +0000 |
---|---|---|
committer | mkanat%kerio.com <> | 2005-02-25 07:42:47 +0000 |
commit | fa9b63f55b3118a30ff641d0e386266eb877e258 (patch) | |
tree | a388e3577fef067abe83e94bbdb52428e442b35b /editcomponents.cgi | |
parent | Bug 280500: Replace "DATE_FORMAT()" with Bugzilla::DB function call (diff) | |
download | bugzilla-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-x | editcomponents.cgi | 9 |
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', |