diff mercurial/hgweb/hgwebdir_mod.py @ 18206:2c1276825e93

merge with stable
author Matt Mackall <mpm@selenic.com>
date Wed, 02 Jan 2013 00:24:28 -0600
parents 40374059d227 e4f17956f45a
children bebb05a7e249
line wrap: on
line diff
--- a/mercurial/hgweb/hgwebdir_mod.py	Thu Dec 20 19:22:12 2012 +0100
+++ b/mercurial/hgweb/hgwebdir_mod.py	Wed Jan 02 00:24:28 2013 -0600
@@ -184,7 +184,13 @@
                         fname = virtual[7:]
                     else:
                         fname = req.form['static'][0]
-                    static = templater.templatepath('static')
+                    static = self.ui.config("web", "static", None,
+                                            untrusted=False)
+                    if not static:
+                        tp = self.templatepath or templater.templatepath()
+                        if isinstance(tp, str):
+                            tp = [tp]
+                        static = [os.path.join(p, 'static') for p in tp]
                     return (staticfile(static, fname, req),)
 
                 # top-level index