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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
2e3a5735
Commit
2e3a5735
authored
Feb 29, 2012
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 731175: Bugzilla::Field shouldn't assume that someone else already loaded required modules
r=glob a=LpSolit
parent
2231368e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
Choice.pm
Bugzilla/Field/Choice.pm
+4
-2
Template.pm
Bugzilla/Template.pm
+4
-4
No files found.
Bugzilla/Field/Choice.pm
View file @
2e3a5735
...
@@ -76,8 +76,10 @@ sub type {
...
@@ -76,8 +76,10 @@ sub type {
my
$field_obj
=
blessed
$field
?
$field
:
Bugzilla::
Field
->
check
(
$field
);
my
$field_obj
=
blessed
$field
?
$field
:
Bugzilla::
Field
->
check
(
$field
);
my
$field_name
=
$field_obj
->
name
;
my
$field_name
=
$field_obj
->
name
;
if
(
$class
->
CLASS_MAP
->
{
$field_name
})
{
if
(
my
$package
=
$class
->
CLASS_MAP
->
{
$field_name
})
{
return
$class
->
CLASS_MAP
->
{
$field_name
};
# Callers expect the module to be already loaded.
eval
"require $package"
;
return
$package
;
}
}
# For generic classes, we use a lowercase class name, so as
# For generic classes, we use a lowercase class name, so as
...
...
Bugzilla/Template.pm
View file @
2e3a5735
...
@@ -10,7 +10,6 @@ package Bugzilla::Template;
...
@@ -10,7 +10,6 @@ package Bugzilla::Template;
use
strict
;
use
strict
;
use
Bugzilla::
Bug
;
use
Bugzilla::
Constants
;
use
Bugzilla::
Constants
;
use
Bugzilla::WebService::
Constants
;
use
Bugzilla::WebService::
Constants
;
use
Bugzilla::
Hook
;
use
Bugzilla::
Hook
;
...
@@ -19,10 +18,8 @@ use Bugzilla::Install::Util qw(install_string template_include_path
...
@@ -19,10 +18,8 @@ use Bugzilla::Install::Util qw(install_string template_include_path
include_languages)
;
include_languages)
;
use
Bugzilla::
Keyword
;
use
Bugzilla::
Keyword
;
use
Bugzilla::
Util
;
use
Bugzilla::
Util
;
use
Bugzilla::
User
;
use
Bugzilla::
Error
;
use
Bugzilla::
Error
;
use
Bugzilla::
Search
;
use
Bugzilla::
Search
;
use
Bugzilla::
Status
;
use
Bugzilla::
Token
;
use
Bugzilla::
Token
;
use
Cwd
qw(abs_path)
;
use
Cwd
qw(abs_path)
;
...
@@ -315,7 +312,10 @@ sub get_bug_link {
...
@@ -315,7 +312,10 @@ sub get_bug_link {
my
$dbh
=
Bugzilla
->
dbh
;
my
$dbh
=
Bugzilla
->
dbh
;
if
(
defined
$bug
)
{
if
(
defined
$bug
)
{
$bug
=
blessed
(
$bug
)
?
$bug
:
new
Bugzilla::
Bug
(
$bug
);
if
(
!
blessed
(
$bug
))
{
require
Bugzilla::
Bug
;
$bug
=
new
Bugzilla::
Bug
(
$bug
);
}
return
$link_text
if
$bug
->
{
error
};
return
$link_text
if
$bug
->
{
error
};
}
}
...
...
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