Index: trunk/testing/installer/mediawiki_installer.py |
— | — | @@ -149,8 +149,9 @@ |
150 | 150 | dbtmp=os.path.join(dstpath,"installerdbtmp.sql") |
151 | 151 | print "Copying instance files..." |
152 | 152 | 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) |
155 | 156 | print "Copying instance database..." |
156 | 157 | dumpdb(src,dbtmp) |
157 | 158 | dropdb(dst) |
— | — | @@ -219,9 +220,10 @@ |
220 | 221 | else: |
221 | 222 | checkout(target+"/", name, revision) |
222 | 223 | |
223 | | - print "Copying LocalSettings.php,creating unique settings..." |
| 224 | + print "Copying LocalSettings.php,creating unique settings, db-admin settings" |
224 | 225 | localsettings(name) |
225 | 226 | uniquesettings(name,language) |
| 227 | + adminsettings(name) |
226 | 228 | print "Copy logo..." |
227 | 229 | logo(name) |
228 | 230 | print "Setting up database..." |
— | — | @@ -306,7 +308,19 @@ |
307 | 309 | unique.write('?>\n') |
308 | 310 | |
309 | 311 | 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') |
310 | 322 | |
| 323 | + admin.close() |
| 324 | + |
311 | 325 | |
312 | 326 | def logo(target): |
313 | 327 | """copy a nice logo""" |