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
49979b37
Commit
49979b37
authored
Jul 04, 2006
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 343112: @Bugzilla::Config::parampanels is only defined if something calls _load_params
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=justdave
parent
089556aa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
17 deletions
+17
-17
Config.pm
Bugzilla/Config.pm
+14
-11
editparams.cgi
editparams.cgi
+3
-6
No files found.
Bugzilla/Config.pm
View file @
49979b37
...
...
@@ -35,8 +35,6 @@ use strict;
use
base
qw(Exporter)
;
use
Bugzilla::
Constants
;
our
@parampanels
=
();
# Module stuff
@
Bugzilla::Config::
EXPORT
=
qw(Param)
;
...
...
@@ -48,9 +46,8 @@ our @parampanels = ();
admin
=>
[
qw(UpdateParams SetParam WriteParams)
],
db
=>
[
qw($db_driver $db_host $db_port $db_name $db_user $db_pass $db_sock)
],
localconfig
=>
[
qw($cvsbin $interdiffbin $diffpath $webservergroup)
],
params
=>
[
qw(@parampanels)
],
);
Exporter::
export_ok_tags
(
'admin'
,
'db'
,
'localconfig'
,
'params'
);
Exporter::
export_ok_tags
(
'admin'
,
'db'
,
'localconfig'
);
use
vars
qw(@param_list)
;
...
...
@@ -71,17 +68,12 @@ do $localconfig;
my
%
params
;
# Load in the param definitions
sub
_load_params
{
my
$libpath
=
bz_locations
()
->
{
'libpath'
};
foreach
my
$item
((
glob
"$libpath/Bugzilla/Config/*.pm"
))
{
$item
=~
m
#/([^/]+)\.pm$#;
my
$module
=
$1
;
next
if
(
$module
eq
'Common'
);
require
"Bugzilla/Config/$module.pm"
;
foreach
my
$module
(
param_panels
())
{
eval
(
"require Bugzilla::Config::$module"
)
||
die
$@
;
my
@new_param_list
=
"Bugzilla::Config::$module"
->
get_param_list
();
foreach
my
$item
(
@new_param_list
)
{
$params
{
$item
->
{
'name'
}}
=
$item
;
}
push
(
@parampanels
,
$module
);
push
(
@param_list
,
@new_param_list
);
}
}
...
...
@@ -89,6 +81,17 @@ sub _load_params {
# Subroutines go here
sub
param_panels
{
my
@param_panels
;
my
$libpath
=
bz_locations
()
->
{
'libpath'
};
foreach
my
$item
((
glob
"$libpath/Bugzilla/Config/*.pm"
))
{
$item
=~
m
#/([^/]+)\.pm$#;
my
$module
=
$1
;
push
(
@param_panels
,
$module
)
unless
$module
eq
'Common'
;
}
return
@param_panels
;
}
sub
Param
{
my
(
$param
)
=
@_
;
...
...
editparams.cgi
View file @
49979b37
...
...
@@ -27,13 +27,11 @@ use lib ".";
use
Bugzilla
;
use
Bugzilla::
Constants
;
use
Bugzilla::
Config
qw(:DEFAULT :admin
:params
)
;
use
Bugzilla::
Config
qw(:DEFAULT :admin)
;
use
Bugzilla::Config::
Common
;
use
Bugzilla::
Util
;
use
Bugzilla::
Error
;
use
vars
qw(@parampanels)
;
my
$user
=
Bugzilla
->
login
(
LOGIN_REQUIRED
);
my
$cgi
=
Bugzilla
->
cgi
;
my
$template
=
Bugzilla
->
template
;
...
...
@@ -53,9 +51,8 @@ $current_panel = $1;
my
$current_module
;
my
@panels
=
();
foreach
my
$panel
(
@parampanels
)
{
next
if
(
$panel
eq
'Common'
);
require
"Bugzilla/Config/$panel.pm"
;
foreach
my
$panel
(
Bugzilla::Config::
param_panels
())
{
eval
(
"require Bugzilla::Config::$panel"
)
||
die
$@
;
my
@module_param_list
=
"Bugzilla::Config::${panel}"
->
get_param_list
(
1
);
my
$item
=
{
name
=>
lc
(
$panel
),
current
=>
(
$current_panel
eq
lc
(
$panel
))
?
1
:
0
,
...
...
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