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
784352d8
Commit
784352d8
authored
Nov 13, 2013
by
Frédéric Buclin
1
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
ba995704
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
Constants.pm
Bugzilla/Constants.pm
+13
-3
No files found.
Bugzilla/Constants.pm
View file @
784352d8
...
...
@@ -608,6 +608,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
...
...
@@ -624,12 +631,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"
;
}
...
...
@@ -664,7 +672,7 @@ 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
;
...
...
@@ -676,4 +684,6 @@ BEGIN { memoize('bz_locations') };
=
item
contenttypes
=
item
bz_locations
=
back
Дмитрий Никулин
@TheOwl
mentioned in commit
275eb1b3
·
Oct 20, 2017
mentioned in commit
275eb1b3
mentioned in commit 275eb1b39a25ef88f47fa5b592c9cf02ad9f754d
Toggle commit list
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