[Jifty-commit] r6803 - jifty/trunk/lib/Jifty/View/Static

Jifty commits jifty-commit at lists.jifty.org
Tue Apr 21 23:52:13 EDT 2009


Author: clkao
Date: Tue Apr 21 23:52:13 2009
New Revision: 6803

Modified:
   jifty/trunk/lib/Jifty/View/Static/Handler.pm

Log:
allow plugins to return more than one static_root.

Modified: jifty/trunk/lib/Jifty/View/Static/Handler.pm
==============================================================================
--- jifty/trunk/lib/Jifty/View/Static/Handler.pm	(original)
+++ jifty/trunk/lib/Jifty/View/Static/Handler.pm	Tue Apr 21 23:52:13 2009
@@ -49,10 +49,11 @@
     my @roots = (Jifty->config->framework('Web')->{StaticRoot});
     my %seen; $seen{$_} = 1 for map Jifty->config->framework('Web')->{$_}, qw/StaticRoot DefaultStaticRoot/;
     for my $plugin ( Jifty->plugins ) {
-        my $root = $plugin->static_root;
-        next unless ( defined $root and -d $root and -r $root and not $seen{$root}++);
-        push @roots, $root;
-        $plugin->log->debug( "Plugin @{[ref($plugin)]} static root added: (@{[$root ||'']})");
+        for my $root ($plugin->static_root) {
+            next unless ( defined $root and -d $root and -r $root and not $seen{$root}++);
+            push @roots, $root;
+            $plugin->log->debug( "Plugin @{[ref($plugin)]} static root added: (@{[$root ||'']})");
+        }
     }
     push @roots, (Jifty->config->framework('Web')->{DefaultStaticRoot});
 


More information about the Jifty-commit mailing list