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
9d96ac72
Commit
9d96ac72
authored
Sep 04, 2006
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 347096: Create Bugzilla->localconfig and replace most read_localconfig calls with it
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=myk
parent
788beb08
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
14 deletions
+17
-14
Bugzilla.pm
Bugzilla.pm
+6
-0
Filesystem.pm
Bugzilla/Install/Filesystem.pm
+2
-2
Localconfig.pm
Bugzilla/Install/Localconfig.pm
+7
-6
checksetup.pl
checksetup.pl
+2
-6
No files found.
Bugzilla.pm
View file @
9d96ac72
...
...
@@ -32,6 +32,7 @@ use Bugzilla::Auth;
use
Bugzilla::Auth::Persist::
Cookie
;
use
Bugzilla::
CGI
;
use
Bugzilla::
DB
;
use
Bugzilla::Install::
Localconfig
qw(read_localconfig)
;
use
Bugzilla::
Template
;
use
Bugzilla::
User
;
use
Bugzilla::
Error
;
...
...
@@ -147,6 +148,11 @@ sub cgi {
return
request_cache
()
->
{
cgi
};
}
sub
localconfig
{
request_cache
()
->
{
localconfig
}
||=
read_localconfig
();
return
request_cache
()
->
{
localconfig
};
}
sub
params
{
my
$class
=
shift
;
request_cache
()
->
{
params
}
||=
Bugzilla::Config::
read_param_file
();
...
...
Bugzilla/Install/Filesystem.pm
View file @
9d96ac72
...
...
@@ -59,7 +59,7 @@ sub FILESYSTEM {
my
$templatedir
=
bz_locations
()
->
{
'templatedir'
};
my
$libdir
=
bz_locations
()
->
{
'libpath'
};
my
$ws_group
=
read_localconfig
()
->
{
'webservergroup'
};
my
$ws_group
=
Bugzilla
->
localconfig
->
{
'webservergroup'
};
# The set of permissions that we use:
...
...
@@ -494,7 +494,7 @@ sub fix_all_file_permissions {
my
$owner_id
=
POSIX::
getuid
();
my
$group_id
=
POSIX::
getgid
();
my
$ws_group
=
read_localconfig
()
->
{
'webservergroup'
};
my
$ws_group
=
Bugzilla
->
localconfig
->
{
'webservergroup'
};
if
(
$ws_group
)
{
my
$ws_group_id
=
getgrnam
(
$ws_group
);
die
"There is no such group: $ws_group. Check your \$webservergroup"
...
...
Bugzilla/Install/Localconfig.pm
View file @
9d96ac72
...
...
@@ -33,11 +33,9 @@ use IO::File;
use
Safe
;
use
base
qw(Exporter)
;
our
@EXPORT
=
qw(
read_localconfig
)
;
our
@EXPORT_OK
=
qw(
read_localconfig
update_localconfig
)
;
...
...
@@ -344,6 +342,9 @@ EOT
# Now we do some checks on localconfig values.
_check_web_server_group
(
$localconfig
->
{
'webservergroup'
})
if
$output
;
# Reset the cache for Bugzilla->localconfig so that it will be re-read
delete
Bugzilla
->
request_cache
->
{
localconfig
};
return
{
old_vars
=>
\
@old_vars
,
new_vars
=>
\
@new_vars
};
}
...
...
@@ -460,14 +461,14 @@ Bugzilla::Install::Localconfig - Functions and variables dealing
=head1 SYNOPSIS
use Bugzilla::Install::Requirements qw(read_localconfig update_localconfig)
my $localconfig = read_localconfig();
use Bugzilla::Install::Requirements qw(update_localconfig);
update_localconfig({ output => 1, answer => \%answer });
=head1 DESCRIPTION
This module is used primarily by L<checksetup.pl> to create and
modify the localconfig file.
modify the localconfig file. Most scripts should use L<Bugzilla/localconfig>
to access localconfig variables.
=head1 CONSTANTS
...
...
checksetup.pl
View file @
9d96ac72
...
...
@@ -331,7 +331,7 @@ require Bugzilla::Bug;
import
Bugzilla::
Bug
qw(is_open_state)
;
require
Bugzilla::Install::
Localconfig
;
import
Bugzilla::Install::
Localconfig
qw(
read_localconfig
update_localconfig)
;
import
Bugzilla::Install::
Localconfig
qw(update_localconfig)
;
require
Bugzilla::Install::
Filesystem
;
import
Bugzilla::Install::
Filesystem
qw(update_filesystem create_htaccess
...
...
@@ -349,11 +349,7 @@ require Bugzilla::Install;
print
"Reading "
.
bz_locations
()
->
{
'localconfig'
}
.
"...\n"
unless
$silent
;
update_localconfig
({
output
=>
!
$silent
,
answer
=>
\%
answer
});
my
$lc_hash
=
read_localconfig
();
# XXX Eventually this variable can be eliminated, but it is
# used more than once throughout checksetup right now.
my
$my_webservergroup
=
$lc_hash
->
{
'webservergroup'
};
my
$lc_hash
=
Bugzilla
->
localconfig
;
###########################################################################
# Check --DATABASE-- setup
...
...
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