From ed492564cf6cbbd12e0763c8949bc55cd8470cae Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Sat, 19 Jun 2010 11:19:08 -0400 Subject: [PATCH] Need to symlink the /horde/static directory, not create one in $web_dir. The *.js files are saved to $horde_git/horde/static/ at runtime, so they are not reachable when the browser tries to load them from $web_dir/horde/static if $web_dir/horde/static is not a symlink to $horde_git/horde/static. --- framework/bin/install_dev | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/framework/bin/install_dev b/framework/bin/install_dev index e063fce6f..f5728a837 100755 --- a/framework/bin/install_dev +++ b/framework/bin/install_dev @@ -57,10 +57,19 @@ $it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($horde_git . while ($it->valid()) { if (!$it->isDot()) { if ($it->isDir()) { - if ($debug) { - print "CREATING DIR: " . $web_dir . '/' . $it->getSubPathName() . "\n"; + // Need to link this directory, since the files in it are created at + // runtime. + if (strpos($it->getPathName(), $horde_git . '/horde/static') !== false) { + if ($debug) { + print "LINKING DIRECTORY: " . $web_dir . "/" . $it->getSubPathName() . "\n"; + } + symlink($it->key(), $web_dir . '/' . $it->getSubPathName()); + } else { + if ($debug) { + print "CREATING DIR: " . $web_dir . '/' . $it->getSubPathName() . "\n"; + } + mkdir($web_dir . '/' . $it->getSubPathName()); } - mkdir($web_dir . '/' . $it->getSubPathName()); } else { if ($debug) { print "LINKING FILE: " . $web_dir . "/" . $it->getSubPathName() . "\n"; @@ -71,12 +80,6 @@ while ($it->valid()) { $it->next(); } -if ($debug) { - print "\nCHGRP/CHMOD static directory\n"; -} -if (!empty($static_group)) { - chgrp($web_dir . '/static', $static_group); -} chmod($web_dir . '/static', $static_mode); print "\nLINKING framework\n"; -- 2.11.0