r51550 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51549‎ | r51550 | r51551 >
Date:17:54, 6 June 2009
Author:kim
Status:deferred
Tags:
Comment:
Add adminsettings
Modified paths:
  • /trunk/testing/installer/mediawiki_installer.py (modified) (history)

Diff [purge]

Index: trunk/testing/installer/mediawiki_installer.py
@@ -149,8 +149,9 @@
150150 dbtmp=os.path.join(dstpath,"installerdbtmp.sql")
151151 print "Copying instance files..."
152152 shutil.copytree(srcpath,dstpath,symlinks=True)
153 - print "updating unique settings"
154 - uniquesettings(dst)
 153+ print "updating unique settings and adminsettings"
 154+ uniquesettings(dst, self.language)
 155+ adminsettings(dst)
155156 print "Copying instance database..."
156157 dumpdb(src,dbtmp)
157158 dropdb(dst)
@@ -219,9 +220,10 @@
220221 else:
221222 checkout(target+"/", name, revision)
222223
223 - print "Copying LocalSettings.php,creating unique settings..."
 224+ print "Copying LocalSettings.php,creating unique settings, db-admin settings"
224225 localsettings(name)
225226 uniquesettings(name,language)
 227+ adminsettings(name)
226228 print "Copy logo..."
227229 logo(name)
228230 print "Setting up database..."
@@ -306,7 +308,19 @@
307309 unique.write('?>\n')
308310
309311 unique.close()
 312+
 313+def adminsettings(target):
 314+ """Set up settings that are unique to one particular wiki (in the file InstallerUniqueSettings.php)"""
 315+ adminsettings=settings.instancesdir+"/"+target+"/AdminSettings.php"
 316+ admin=file(adminsettings,"w")
 317+ admin.write('<?php\n')
 318+ admin.write('$wgDBadminuser = "'+settings.mysql_user+'";\n')
 319+ admin.write('$wgDBadminpassword = "'+settings.mysql_pass+'";\n')
 320+ admin.write('$wgEnableProfileInfo = false;\n')
 321+ admin.write('?>\n')
310322
 323+ admin.close()
 324+
311325
312326 def logo(target):
313327 """copy a nice logo"""

Status & tagging log