r71401 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71400‎ | r71401 | r71402 >
Date:14:34, 21 August 2010
Author:platonides
Status:ok
Tags:
Comment:
Commit local change about not using $ourdb as global.
Modified paths:
  • /trunk/phase3/config/Installer.php (modified) (history)

Diff [purge]

Index: trunk/phase3/config/Installer.php
@@ -1598,7 +1598,7 @@
15991599 }
16001600 ?>
16011601 <ul class='plain'><?php
1602 - database_picker($conf);
 1602+ database_picker($ourdb, $conf);
16031603 ?></ul>
16041604 </div>
16051605
@@ -1639,7 +1639,7 @@
16401640 </p>
16411641 </div>
16421642
1643 - <?php database_switcher('mysql'); ?>
 1643+ <?php database_switcher($ourdb, 'mysql'); ?>
16441644 <div class="config-input"><?php aField( $conf, "DBprefix", "Database table prefix:" ); ?></div>
16451645 <div class="config-desc">
16461646 <p>If you need to share one database between multiple wikis, or
@@ -1678,7 +1678,7 @@
16791679 </p>
16801680 </fieldset>
16811681
1682 - <?php database_switcher('postgres'); ?>
 1682+ <?php database_switcher($ourdb, 'postgres'); ?>
16831683 <div class="config-input"><?php aField( $conf, "DBport", "Database port:" ); ?></div>
16841684 <div class="config-input"><?php aField( $conf, "DBpgschema", "Schema for mediawiki:" ); ?></div>
16851685 <div class="config-input"><?php aField( $conf, "DBts2schema", "Schema for tsearch2:" ); ?></div>
@@ -1689,7 +1689,7 @@
16901690 </div>
16911691 </fieldset>
16921692
1693 - <?php database_switcher('sqlite'); ?>
 1693+ <?php database_switcher($ourdb, 'sqlite'); ?>
16941694 <div class="config-input"><?php
16951695 aField( $conf, "SQLiteDataDir", "SQLite data directory:" );
16961696 ?></div>
@@ -1702,14 +1702,14 @@
17031703 </fieldset>
17041704
17051705
1706 - <?php database_switcher( 'mssql' ); ?>
 1706+ <?php database_switcher($ourdb, 'mssql' ); ?>
17071707 <div class="config-desc">
17081708 <p>No MS SQL Server specific options at this time.</p>
17091709 </div>
17101710 </fieldset>
17111711
17121712
1713 - <?php database_switcher('ibm_db2'); ?>
 1713+ <?php database_switcher($ourdb, 'ibm_db2'); ?>
17141714 <div class="config-input"><?php
17151715 aField( $conf, "DBport_db2", "Database port:" );
17161716 ?></div>
@@ -1728,7 +1728,7 @@
17291729 </div>
17301730 </fieldset>
17311731
1732 - <?php database_switcher('oracle'); ?>
 1732+ <?php database_switcher($ourdb, 'oracle'); ?>
17331733 <div class="config-input"><?php aField( $conf, "DBprefix_ora", "Database table prefix:" ); ?></div>
17341734 <div class="config-desc">
17351735 <p>If you need to share one database between multiple wikis, or
@@ -2218,8 +2218,7 @@
22192219 return $errstr;
22202220 }
22212221
2222 -function database_picker($conf) {
2223 - global $ourdb;
 2222+function database_picker($ourdb, $conf) {
22242223 print "\n";
22252224 foreach(array_keys($ourdb) as $db) {
22262225 if ($ourdb[$db]['havedriver']) {
@@ -2231,8 +2230,7 @@
22322231 print "\n\t";
22332232 }
22342233
2235 -function database_switcher($db) {
2236 - global $ourdb;
 2234+function database_switcher($ourdb, $db) {
22372235 $color = $ourdb[$db]['bgcolor'];
22382236 $full = $ourdb[$db]['fullname'];
22392237 print "<fieldset id='$db' style='clear:both'><legend>$full-specific options</legend>\n";

Status & tagging log