) ) .
$this->parent->getTextBox( array(
'var' => '_AdminEmail',
+ 'attribs' => array(
+ 'dir' => 'ltr',
+ ),
'label' => 'config-admin-email',
'help' => $this->parent->getHelpBox( 'config-admin-email-help' )
) ) .
'var' => 'wgDefaultSkin',
'itemLabels' => array_fill_keys( $skinNames, 'config-skins-use-as-default' ),
'values' => $skinNames,
- 'value' => $this->getVar( 'wgDefaultSkin', $this->getDefaultSkin( $skinNames ) ),
+ 'value' => $this->getVar( 'wgDefaultSkin', $this->parent->getDefaultSkin( $skinNames ) ),
) );
foreach ( $skins as $skin ) {
$this->addHTML( $this->getCCDoneBox() );
}
- /**
- * Returns a default value to be used for $wgDefaultSkin: the preferred skin, if available among
- * the installed skins, or any other one otherwise.
- *
- * @param string[] $skinNames Names of installed skins.
- * @return string
- */
- public function getDefaultSkin( array $skinNames ) {
- $defaultSkin = $GLOBALS['wgDefaultSkin'];
- if ( in_array( $defaultSkin, $skinNames ) ) {
- return $defaultSkin;
- } else {
- return $skinNames[0];
- }
- }
-
/**
* If the user skips this installer page, we still need to set up the default skins, but ignore
* everything else.
if ( $skins ) {
$skinNames = array_map( 'strtolower', $skins );
- $this->parent->setVar( 'wgDefaultSkin', $this->getDefaultSkin( $skinNames ) );
+ $this->parent->setVar( 'wgDefaultSkin', $this->parent->getDefaultSkin( $skinNames ) );
}
return true;
$retVal = true;
- if ( !array_key_exists( $this->getVar( '_RightsProfile' ), $this->parent->rightsProfiles )
- ) {
+ if ( !array_key_exists( $this->getVar( '_RightsProfile' ), $this->parent->rightsProfiles ) ) {
reset( $this->parent->rightsProfiles );
$this->setVar( '_RightsProfile', key( $this->parent->rightsProfiles ) );
}
strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE' ) !== false
) {
// JS appears to be the only method that works consistently with IE7+
- $this->addHtml( "\n<script>jQuery( function () { document.location = " .
+ $this->addHtml( "\n<script>jQuery( function () { location.href = " .
Xml::encodeJsVar( $lsUrl ) . "; } );</script>\n" );
} else {
$this->parent->request->response()->header( "Refresh: 0;url=$lsUrl" );