From 8d6aad953ec6a44dbe8ce92c205fbb1b53956a35 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Thu, 10 May 2007 22:01:09 +0000 Subject: [PATCH] Bug 376908: Installation process should not assume skins are in the same directory as checksetup.pl - Patch by guillomovitch@zarb.org r/a=mkanat --- Bugzilla/Constants.pm | 2 +- Bugzilla/Install/Filesystem.pm | 5 +++-- Bugzilla/User/Setting/Skin.pm | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Bugzilla/Constants.pm b/Bugzilla/Constants.pm index fc81014351..57ed8dfa0c 100644 --- a/Bugzilla/Constants.pm +++ b/Bugzilla/Constants.pm @@ -426,7 +426,7 @@ sub bz_locations { 'localconfig' => "$libpath/$localconfig", 'datadir' => "$libpath/$datadir", 'attachdir' => "$libpath/$datadir/attachments", - 'skinsdir' => "$libpath/skins/contrib", + 'skinsdir' => "$libpath/skins", # $webdotdir must be in the webtree somewhere. Even if you use a # local dot, we output images to there. Also, if $webdotdir is # not relative to the bugzilla root directory, you'll need to diff --git a/Bugzilla/Install/Filesystem.pm b/Bugzilla/Install/Filesystem.pm index c13df2893e..d5b8a58c45 100644 --- a/Bugzilla/Install/Filesystem.pm +++ b/Bugzilla/Install/Filesystem.pm @@ -61,6 +61,7 @@ sub FILESYSTEM { my $webdotdir = bz_locations()->{'webdotdir'}; my $templatedir = bz_locations()->{'templatedir'}; my $libdir = bz_locations()->{'libpath'}; + my $skinsdir = bz_locations()->{'skinsdir'}; my $ws_group = Bugzilla->localconfig->{'webservergroup'}; @@ -200,9 +201,9 @@ sub FILESYSTEM { # Each standard stylesheet has an associated custom stylesheet that # we create. - foreach my $standard () { + foreach my $standard (<$skinsdir/standard/*.css>) { my $custom = $standard; - $custom =~ s|^skins/standard|skins/custom|; + $custom =~ s|\Q$skinsdir\E/standard|$skinsdir/custom|; $create_files{$custom} = { perms => $ws_readable, contents => <{'legal_values'} if defined $self->{'legal_values'}; - my $dirbase = bz_locations()->{'skinsdir'}; + my $dirbase = bz_locations()->{'skinsdir'} . '/contrib'; # Avoid modification of the list BUILTIN_SKIN_NAMES points to by copying the # list over instead of simply writing $legal_values = BUILTIN_SKIN_NAMES. my @legal_values = @{(BUILTIN_SKIN_NAMES)}; -- 2.47.2