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
f5d28845
Commit
f5d28845
authored
Nov 13, 2013
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 843457: PROJECT environment variable is not honored when mod_perl is enabled
r/a=glob
parent
1aabf206
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
Constants.pm
Bugzilla/Constants.pm
+11
-3
No files found.
Bugzilla/Constants.pm
View file @
f5d28845
...
...
@@ -592,6 +592,13 @@ use constant AUDIT_CREATE => '__create__';
use
constant
AUDIT_REMOVE
=>
'__remove__'
;
sub
bz_locations
{
# Force memoize() to re-compute data per project, to avoid
# sharing the same data across different installations.
return
_bz_locations
(
$ENV
{
'PROJECT'
});
}
sub
_bz_locations
{
my
$project
=
shift
;
# We know that Bugzilla/Constants.pm must be in %INC at this point.
# So the only question is, what's the name of the directory
# above it? This is the most reliable way to get our current working
...
...
@@ -608,12 +615,13 @@ sub bz_locations {
$libpath
=~
/(.*)/
;
$libpath
=
$1
;
my
(
$
project
,
$
localconfig
,
$datadir
);
if
(
$
ENV
{
'PROJECT'
}
&&
$ENV
{
'PROJECT'
}
=~
/^(\w+)$/
)
{
my
(
$localconfig
,
$datadir
);
if
(
$
project
&&
$project
=~
/^(\w+)$/
)
{
$project
=
$1
;
$localconfig
=
"localconfig.$project"
;
$datadir
=
"data/$project"
;
}
else
{
$project
=
undef
;
$localconfig
=
"localconfig"
;
$datadir
=
"data"
;
}
...
...
@@ -648,6 +656,6 @@ sub bz_locations {
# This makes us not re-compute all the bz_locations data every time it's
# called.
BEGIN
{
memoize
(
'bz_locations'
)
};
BEGIN
{
memoize
(
'
_
bz_locations'
)
};
1
;
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