Index: Config.pm =================================================================== RCS file: /var/lib/cvs/youri/bugzilla/Bugzilla/Config.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -a -u -r1.1 -r1.2 --- Config.pm 17 Feb 2005 22:17:49 -0000 1.1 +++ Config.pm 17 Feb 2005 22:27:55 -0000 1.2 @@ -51,12 +51,25 @@ # graphs (since the path will be wrong in the HTML). This will be fixed at # some point. +# constant paths our $libpath = '.'; -our $localconfig = "$libpath/localconfig"; -our $datadir = "$libpath/data"; our $templatedir = "$libpath/template"; + +# variable paths +our $project; +our $localconfig; +our $datadir; +if ($ENV{PROJECT} && $ENV{PROJECT} =~ /^(\w+)$/) { + $project = $1; + $localconfig = "$libpath/localconfig.$project"; + $datadir = "$libpath/data/$project"; +} else { + $localconfig = "$libpath/localconfig"; + $datadir = "$libpath/data"; +} our $webdotdir = "$datadir/webdot"; + # Module stuff @Bugzilla::Config::EXPORT = qw(Param); @@ -71,7 +84,7 @@ ( admin => [qw(GetParamList UpdateParams SetParam WriteParams)], db => [qw($db_host $db_port $db_name $db_user $db_pass $db_sock)], - locations => [qw($libpath $localconfig $datadir $templatedir $webdotdir)], + locations => [qw($libpath $localconfig $datadir $templatedir $webdotdir $project)], ); Exporter::export_ok_tags('admin', 'db', 'locations'); Index: Template.pm =================================================================== RCS file: /var/lib/cvs/youri/bugzilla/Bugzilla/Template.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -a -u -r1.1 -r1.2 --- Template.pm 17 Feb 2005 22:17:49 -0000 1.1 +++ Template.pm 17 Feb 2005 22:27:55 -0000 1.2 @@ -29,7 +29,7 @@ use strict; -use Bugzilla::Config qw(:DEFAULT $templatedir $datadir); +use Bugzilla::Config qw(:DEFAULT $templatedir $datadir $project); use Bugzilla::Util; # for time2str - replace by TT Date plugin?? @@ -78,7 +78,8 @@ my $languages = trim(Param('languages')); if (not ($languages =~ /,/)) { return $template_include_path = - ["$templatedir/$languages/custom", + ["$templatedir/$languages/$project", + "$templatedir/$languages/custom", "$templatedir/$languages/extension", "$templatedir/$languages/default"]; } @@ -97,7 +98,8 @@ } push(@usedlanguages, Param('defaultlanguage')); return $template_include_path = - [map(("$templatedir/$_/custom", + [map(("$templatedir/$_/$project", + "$templatedir/$_/custom", "$templatedir/$_/extension", "$templatedir/$_/default"), @usedlanguages)];