]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/app/php.py
Fix web verification in MediaWiki and improve handling.
[wizard.git] / wizard / app / php.py
index 0d9fcfd5962b57ffe8d7d90b933ece339085ad8e..fdf201248c2d4d3ee6742dfbb19c3af18fe6b658 100644 (file)
@@ -1,3 +1,18 @@
-php_ini_regexes = \
-        {'WIZARD_SESSIONNAME': None,
-         'WIZARD_TMPDIR': None}
+import re
+
+from wizard import app, util
+
+def make_filename_regex(var):
+    return 'php.ini', re.compile('^(' + app.expand_re(var) + r'\s*=\s*)(.*)()$', re.M)
+
+make_extractor = app.filename_regex_extractor(make_filename_regex)
+make_substitution = app.filename_regex_substitution(make_filename_regex)
+seed = {
+        'WIZARD_SESSIONNAME': 'session.name',
+        'WIZARD_TMPDIR': ('upload_tmp_dir', 'session.save_path'),
+        }
+
+extractors = util.dictmap(make_extractor, seed)
+substitutions = util.dictkmap(make_substitution, seed)
+deprecated_keys = set([])
+