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
7d90e43e
Commit
7d90e43e
authored
Nov 05, 2007
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 383522: mod_perl creates a separate template directory
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=mkanat
parent
9f774e4a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
11 deletions
+14
-11
Template.pm
Bugzilla/Template.pm
+14
-11
No files found.
Bugzilla/Template.pm
View file @
7d90e43e
...
...
@@ -790,17 +790,20 @@ sub precompile_templates {
# *compiled* versions using the full absolute path under the data/template
# directory. (Like data/template/var/www/html/mod_perl/.) To avoid
# re-compiling templates under mod_perl, we symlink to the
# already-compiled templates.
my
$abs_root
=
dirname
(
abs_path
(
$templatedir
));
mkpath
(
"$datadir/template$abs_root"
);
my
$todir
=
"$datadir/template$abs_root"
;
# We use abs2rel so that the symlink will look like "../../../../template"
# which works, while just "data/template/template/" doesn't work.
my
$fromdir
=
File::
Spec
->
abs2rel
(
"$datadir/template/template"
,
$todir
);
# We eval for systems (like Windows) that can't symlink, where "symlink"
# throws a fatal error.
eval
{
symlink
(
$fromdir
,
"$todir/template"
)
or
warn
"Failed to symlink from $fromdir to $todir: $!"
};
# already-compiled templates. This doesn't work on Windows.
if
(
!
ON_WINDOWS
)
{
my
$abs_root
=
dirname
(
abs_path
(
$templatedir
));
my
$todir
=
"$datadir/template$abs_root"
;
mkpath
(
$todir
);
# We use abs2rel so that the symlink will look like
# "../../../../template" which works, while just
# "data/template/template/" doesn't work.
my
$fromdir
=
File::
Spec
->
abs2rel
(
"$datadir/template/template"
,
$todir
);
# We eval for systems that can't symlink at all, where "symlink"
# throws a fatal error.
eval
{
symlink
(
$fromdir
,
"$todir/template"
)
or
warn
"Failed to symlink from $fromdir to $todir: $!"
};
}
# If anything created a Template object before now, clear it out.
delete
Bugzilla
->
request_cache
->
{
template
};
...
...
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