diff MoinMoin/wikiutil.py @ 1550:a4f0632414da

using request.cfg.cache more
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Thu, 14 Sep 2006 22:49:42 +0200
parents e36313297589
children 0d2f2d531e81
line wrap: on
line diff
--- a/MoinMoin/wikiutil.py	Thu Sep 14 22:08:45 2006 +0200
+++ b/MoinMoin/wikiutil.py	Thu Sep 14 22:49:42 2006 +0200
@@ -1148,7 +1148,7 @@
     @rtype: class, None
     @returns: the parser class or None
     """
-    if not hasattr(cfg, '_EXT_TO_PARSER'):
+    if not hasattr(cfg.cache, 'EXT_TO_PARSER'):
         etp, etd = {}, None
         for pname in getPlugins('parser', cfg):
             try:
@@ -1162,10 +1162,10 @@
                         etp[ext] = Parser
                 elif str(exts) == '*':
                     etd = Parser
-        cfg._EXT_TO_PARSER = etp
-        cfg._EXT_TO_PARSER_DEFAULT = etd
+        cfg.cache.EXT_TO_PARSER = etp
+        cfg.cache.EXT_TO_PARSER_DEFAULT = etd
 
-    return cfg._EXT_TO_PARSER.get(extension, cfg._EXT_TO_PARSER_DEFAULT)
+    return cfg.cache.EXT_TO_PARSER.get(extension, cfg.cache.EXT_TO_PARSER_DEFAULT)
 
 
 #############################################################################