r84970 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84969‎ | r84970 | r84971 >
Date:17:06, 29 March 2011
Author:demon
Status:ok
Tags:
Comment:
(bug 26481) $wgUpgradeKey/$wgSecretKey values sometimes not filled - only happened when you upgrade without LocalSettings and tried to create a new one
Modified paths:
  • /trunk/phase3/includes/installer/Installer.php (modified) (history)
  • /trunk/phase3/includes/installer/WebInstallerPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/Installer.php
@@ -1312,7 +1312,7 @@
13131313 *
13141314 * @return Status
13151315 */
1316 - protected function generateSecretKey() {
 1316+ public function generateSecretKey() {
13171317 return $this->generateSecret( 'wgSecretKey' );
13181318 }
13191319
Index: trunk/phase3/includes/installer/WebInstallerPage.php
@@ -475,6 +475,12 @@
476476 <script>jQuery( "#config-spinner" )[0].style.display = "none";</script>' );
477477 $this->parent->output->flush();
478478 if ( $result ) {
 479+ // If they're going to possibly regenerate LocalSettings, we
 480+ // need to create the upgrade/secret keys. Bug 26481
 481+ if( !$this->getVar( '_ExistingDBSettings' ) ) {
 482+ $this->parent->generateSecretKey();
 483+ $this->parent->generateUpgradeKey();
 484+ }
479485 $this->setVar( '_UpgradeDone', true );
480486 $this->showDoneMessage();
481487 return 'output';

Follow-up revisions

RevisionCommit summaryAuthorDate
r85012MFT installer changes: r84755, r84756, r84875, r84881, r84882, r84970, r84976demon14:46, 30 March 2011

Status & tagging log