$wgReadOnlyFile = false;
/**
- * Set this to a random string to allow web-based upgrades
+ * When you run the web-based upgrade utility, it will tell you what to set
+ * this to in order to authorize the upgrade process. It will subsequently be
+ * used as a password, to authorize further upgrades.
+ *
+ * For security, do not set this to a guessable string. Use the value supplied
+ * by the install/upgrade process. To cause the upgrader to generate a new key,
+ * delete the old key from LocalSettings.php.
*/
$wgUpgradeKey = false;
If you want to regenerate your <code>LocalSettings.php</code> file, click the button below.
This is '''not recommended''' unless you are having problems with your wiki.",
+ 'config-upgrade-done-no-regenerate' => "Upgrade complete.
+
+You can now [$1 start using your wiki].",
'config-regenerate' => 'Regenerate LocalSettings.php →',
'config-show-table-status' => 'SHOW TABLE STATUS query failed!',
'config-unknown-collation' => "'''Warning:''' Database is using unrecognised collation.",
);
}
- public function endForm( $continue = 'continue' ) {
+ public function endForm( $continue = 'continue', $back = 'back' ) {
$s = "<div class=\"config-submit\">\n";
$id = $this->getId();
array( 'name' => "enter-$continue", 'style' => 'visibility:hidden;overflow:hidden;width:1px;margin:0' ) ) . "\n";
}
- if ( $id !== 0 ) {
- $s .= Xml::submitButton( wfMsg( 'config-back' ),
+ if ( $back ) {
+ $s .= Xml::submitButton( wfMsg( "config-$back" ),
array(
- 'name' => 'submit-back',
+ 'name' => "submit-$back",
'tabindex' => $this->parent->nextTabIndex()
) ) . "\n";
}
$this->getLanguageSelector( 'UserLang', 'config-your-language', $userLang, $this->parent->getHelpBox( 'config-your-language-help' ) ) .
$this->getLanguageSelector( 'ContLang', 'config-wiki-language', $contLang, $this->parent->getHelpBox( 'config-wiki-language-help' ) );
$this->addHTML( $s );
- $this->endForm();
+ $this->endForm( 'continue', false );
}
/**
public function execute() {
if ( $this->getVar( '_UpgradeDone' ) ) {
- if ( $this->parent->request->wasPosted() ) {
+ // Allow regeneration of LocalSettings.php, unless we are working
+ // from a pre-existing LocalSettings.php file and we want to avoid
+ // leaking its contents
+ if ( $this->parent->request->wasPosted() && !$this->getVar( '_ExistingDBSettings' ) ) {
// Done message acknowledged
return 'continue';
} else {
public function showDoneMessage() {
$this->startForm();
+ $regenerate = !$this->getVar( '_ExistingDBSettings' );
+ if ( $regenerate ) {
+ $msg = 'config-upgrade-done';
+ } else {
+ $msg = 'config-upgrade-done-no-regenerate';
+ }
+ $this->parent->disableLinkPopups();
$this->addHTML(
$this->parent->getInfoBox(
- wfMsgNoTrans( 'config-upgrade-done',
+ wfMsgNoTrans( $msg,
$GLOBALS['wgServer'] .
$this->getVar( 'wgScriptPath' ) . '/index' .
$this->getVar( 'wgScriptExtension' )
), 'tick-32.png'
)
);
- $this->endForm( 'regenerate' );
+ $this->parent->restoreLinkPopups();
+ $this->endForm( $regenerate ? 'regenerate' : false, false );
}
}
$this->parent->request->response()->header( "Refresh: 0;$lsUrl" );
$this->startForm();
+ $this->parent->disableLinkPopups();
$this->addHTML(
$this->parent->getInfoBox(
wfMsgNoTrans( 'config-install-done',
), 'tick-32.png'
)
);
- $this->endForm( false );
+ $this->parent->restoreLinkPopups();
+ $this->endForm( false, false );
}
}