3 from wizard import app, deploy, util
4 from wizard.app import php
6 def make_filename_regex(var):
7 return 'LocalSettings.php', re.compile('^\$(' + re.escape(var) + r'''\s*=\s*)(.*)(;)$''', re.M)
9 make_extractor = app.filename_regex_extractor(make_filename_regex)
11 class Application(deploy.Application):
14 if not self._extractors:
15 self._extractors = util.dictmap(make_extractor,
16 {'WIZARD_IP': 'IP' # obsolete
17 ,'WIZARD_SITENAME': 'wgSitename'
18 ,'WIZARD_SCRIPTPATH': 'wgScriptPath'
19 ,'WIZARD_EMERGENCYCONTACT': 'wgEmergencyContact'
20 ,'WIZARD_DBSERVER': 'wgDBserver'
21 ,'WIZARD_DBNAME': 'wgDBname'
22 ,'WIZARD_DBUSER': 'wgDBuser'
23 ,'WIZARD_DBPASSWORD': 'wgDBpassword'
24 ,'WIZARD_PROXYKEY': 'wgProxyKey'
26 self._extractors.update(php.extractors)
27 return self._extractors