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