myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [2565] trunk/lib/conf.rb: added ability to change


From: noreply
Subject: [myexperiment-hackers] [2565] trunk/lib/conf.rb: added ability to change theme for a path prefix
Date: Mon, 28 Feb 2011 11:24:53 -0500 (EST)

Revision
2565
Author
dgc
Date
2011-02-28 11:24:52 -0500 (Mon, 28 Feb 2011)

Log Message

added ability to change theme for a path prefix

Modified Paths

Diff

Modified: trunk/lib/conf.rb (2564 => 2565)


--- trunk/lib/conf.rb	2011-02-25 10:49:22 UTC (rev 2564)
+++ trunk/lib/conf.rb	2011-02-28 16:24:52 UTC (rev 2565)
@@ -176,6 +176,14 @@
           if settings['host'] && request.host == settings['host']
             @config = name
           end
+
+          if settings['prefix'] && request.path.starts_with?(settings['prefix'])
+            remainder = request.path[settings['prefix'].length..-1]
+
+            if remainder.empty? || remainder.match(/^[.\/]/)
+              @config = name
+            end
+          end
         end
       end
     end

reply via email to

[Prev in Thread] Current Thread [Next in Thread]