Need to symlink the /horde/static directory, not create one in $web_dir.
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 19 Jun 2010 15:19:08 +0000 (11:19 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 19 Jun 2010 15:19:08 +0000 (11:19 -0400)
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

index e063fce..f5728a8 100755 (executable)
@@ -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";