Didn't see comments about escaping html and use of tipsy; will be addressed in next commit.
/**
* Base class for DBMS-specific installation helper classes.
- *
+ *
* @ingroup Deployment
* @since 1.17
*/
/**
* The Installer object.
- *
+ *
* TODO: naming this parent is confusing, 'installer' would be clearer.
- *
+ *
* @var Installer
*/
public $parent;
/**
* The database connection.
- *
+ *
* @var DatabaseBase
*/
public $db;
/**
* Internal variables for installation.
- *
+ *
* @var array
*/
protected $internalDefaults = array();
/**
* Array of MW configuration globals this class uses.
- *
+ *
* @var array
*/
protected $globalNames = array();
/**
* Get HTML for a web form that configures this database. Configuration
- * at this time should be the minimum needed to connect and test
+ * at this time should be the minimum needed to connect and test
* whether install or upgrade is required.
*
* If this is called, $this->parent can be assumed to be a WebInstaller.
/**
* Set variables based on the request array, assuming it was submitted
- * via the form returned by getConnectForm(). Validate the connection
+ * via the form returned by getConnectForm(). Validate the connection
* settings by attempting to connect with them.
*
* If this is called, $this->parent can be assumed to be a WebInstaller.
/**
* Get HTML for a web form that retrieves settings used for installation.
* $this->parent can be assumed to be a WebInstaller.
- * If the DB type has no settings beyond those already configured with
+ * If the DB type has no settings beyond those already configured with
* getConnectForm(), this should return false.
*/
public function getSettingsForm() {
/**
* Set variables based on the request array, assuming it was submitted via
* the form return by getSettingsForm().
- *
+ *
* @return Status
*/
public function submitSettingsForm() {
/**
* Connect to the database using the administrative user/password currently
- * defined in the session. On success, return the connection, on failure,
+ * defined in the session. On success, return the connection, on failure,
*
* This may be called multiple times, so the result should be cached.
*
/**
* Create database tables from scratch.
- *
+ *
* @return Status
*/
public function createTables() {
/**
* Get the DBMS-specific options for LocalSettings.php generation.
- *
+ *
* @return String
*/
public abstract function getLocalSettings();
*/
public function getGlobalNames() {
return $this->globalNames;
- }
+ }
/**
* Return any table options to be applied to all tables that don't
* override them.
- *
+ *
* @return Array
*/
public function getTableOptions() {
return array();
}
- /**
+ /**
* Construct and initialise parent.
* This is typically only called from Installer::getDBInstaller()
*/
/**
* Convenience function.
* Check if a named extension is present.
- *
+ *
* @see wfDl
*/
protected static function checkExtension( $name ) {
/**
* Get a labelled text box to configure a local variable.
*/
- public function getTextBox( $var, $label, $attribs = array() ) {
+ public function getTextBox( $var, $label, $attribs = array(), $helpData = "" ) {
$name = $this->getName() . '_' . $var;
$value = $this->getVar( $var );
+ if ( !isset( $attribs ) ) {
+ $attribs = array();
+ }
return $this->parent->getTextBox( array(
'var' => $var,
'label' => $label,
'attribs' => $attribs,
'controlName' => $name,
- 'value' => $value
+ 'value' => $value,
+ 'help' => $helpData
) );
}
* Get a labelled password box to configure a local variable.
* Implements password hiding.
*/
- public function getPasswordBox( $var, $label, $attribs = array() ) {
+ public function getPasswordBox( $var, $label, $attribs = array(), $helpData = "" ) {
$name = $this->getName() . '_' . $var;
$value = $this->getVar( $var );
+ if ( !isset( $attribs ) ) {
+ $attribs = array();
+ }
return $this->parent->getPasswordBox( array(
'var' => $var,
'label' => $label,
'attribs' => $attribs,
'controlName' => $name,
- 'value' => $value
+ 'value' => $value,
+ 'help' => $helpData
) );
}
/**
* Get a labelled checkbox to configure a local boolean variable.
*/
- public function getCheckBox( $var, $label, $attribs = array() ) {
+ public function getCheckBox( $var, $label, $attribs = array(), $helpData = "" ) {
$name = $this->getName() . '_' . $var;
$value = $this->getVar( $var );
return $this->parent->getCheckBox( array(
'attribs' => $attribs,
'controlName' => $name,
'value' => $value,
+ 'help' => $helpData
));
}
}
/**
- * Determine whether an existing installation of MediaWiki is present in
- * the configured administrative connection. Returns true if there is
+ * Determine whether an existing installation of MediaWiki is present in
+ * the configured administrative connection. Returns true if there is
* such a wiki, false if the database doesn't exist.
*
- * Traditionally, this is done by testing for the existence of either
+ * Traditionally, this is done by testing for the existence of either
* the revision table or the cur table.
*
* @return Boolean
return
Html::openElement( 'fieldset' ) .
Html::element( 'legend', array(), wfMsg( 'config-db-install-account' ) ) .
- $this->getTextBox( '_InstallUser', 'config-db-username' ) .
- $this->getPasswordBox( '_InstallPassword', 'config-db-password' ) .
- $this->parent->getHelpBox( 'config-db-install-help' ) .
+ $this->getTextBox( '_InstallUser', 'config-db-username', array(), $this->parent->getHelpBox( 'config-db-install-username' ) ) .
+ $this->getPasswordBox( '_InstallPassword', 'config-db-password', array(), $this->parent->getHelpBox( 'config-db-install-password' ) ) .
Html::closeElement( 'fieldset' );
}
public function getWebUserBox( $noCreateMsg = false ) {
$s = Html::openElement( 'fieldset' ) .
Html::element( 'legend', array(), wfMsg( 'config-db-web-account' ) ) .
- $this->getCheckBox(
+ $this->getCheckBox(
'_SameAccount', 'config-db-web-account-same',
array( 'class' => 'hideShowRadio', 'rel' => 'dbOtherAccount' )
) .
/**
* Submit the form from getWebUserBox().
- *
+ *
* @return Status
*/
public function submitWebUserBox() {
'config-no-session' => 'Your session data was lost!
Check your php.ini and make sure <code>session.save_path</code> is set to an appropriate directory.',
'config-session-path-bad' => 'Your <code>session.save_path</code> (<code>$1</code>) seems to be invalid or unwritable.',
- 'config-show-help' => 'Help',
- 'config-hide-help' => 'Hide help',
'config-your-language' => 'Your language:',
'config-your-language-help' => 'Select a language to use during the installation process.',
'config-wiki-language' => 'Wiki language:',
/**
* Class for setting up the MediaWiki database using MySQL.
- *
+ *
* @ingroup Deployment
* @since 1.17
*/
public function getConnectForm() {
return
- $this->getTextBox( 'wgDBserver', 'config-db-host' ) .
- $this->parent->getHelpBox( 'config-db-host-help' ) .
+ $this->getTextBox( 'wgDBserver', 'config-db-host', array(), $this->parent->getHelpBox( 'config-db-host-help' ) ) .
Html::openElement( 'fieldset' ) .
Html::element( 'legend', array(), wfMsg( 'config-db-wiki-settings' ) ) .
- $this->getTextBox( 'wgDBname', 'config-db-name' ) .
- $this->parent->getHelpBox( 'config-db-name-help' ) .
- $this->getTextBox( 'wgDBprefix', 'config-db-prefix' ) .
- $this->parent->getHelpBox( 'config-db-prefix-help' ) .
+ $this->getTextBox( 'wgDBname', 'config-db-name', array(), $this->parent->getHelpBox( 'config-db-name-help' ) ) .
+ $this->getTextBox( 'wgDBprefix', 'config-db-prefix', array(), $this->parent->getHelpBox( 'config-db-prefix-help' ) ) .
Html::closeElement( 'fieldset' ) .
$this->getInstallUserBox();
}
$this->getVar( '_InstallPassword' ),
false,
false,
- 0,
+ 0,
$this->getVar( 'wgDBprefix' )
);
$status->value = $this->db;
if ( count( $parts ) != 2 ) {
return false;
}
- $quotedUser = $conn->addQuotes( $parts[0] ) .
+ $quotedUser = $conn->addQuotes( $parts[0] ) .
'@' . $conn->addQuotes( $parts[1] );
// The user needs to have INSERT on mysql.* to be able to CREATE USER
// The grantee will be double-quoted in this query, as required
- $res = $conn->select( 'INFORMATION_SCHEMA.USER_PRIVILEGES', '*',
+ $res = $conn->select( 'INFORMATION_SCHEMA.USER_PRIVILEGES', '*',
array( 'GRANTEE' => $quotedUser ), __METHOD__ );
$insertMysql = false;
$grantOptions = array_flip( $this->webUserPrivs );
// Check for DB-specific privs for mysql.*
if ( !$insertMysql ) {
$row = $conn->selectRow( 'INFORMATION_SCHEMA.SCHEMA_PRIVILEGES', '*',
- array(
+ array(
'GRANTEE' => $quotedUser,
'TABLE_SCHEMA' => 'mysql',
'PRIVILEGE_TYPE' => 'INSERT',
}
// Check for DB-level grant options
- $res = $conn->select( 'INFORMATION_SCHEMA.SCHEMA_PRIVILEGES', '*',
+ $res = $conn->select( 'INFORMATION_SCHEMA.SCHEMA_PRIVILEGES', '*',
array(
'GRANTEE' => $quotedUser,
'IS_GRANTABLE' => 1,
}
if ( count( $engines ) >= 2 ) {
$s .= $this->getRadioSet( array(
- 'var' => '_MysqlEngine',
- 'label' => 'config-mysql-engine',
- 'itemLabelPrefix' => 'config-mysql-',
+ 'var' => '_MysqlEngine',
+ 'label' => 'config-mysql-engine',
+ 'itemLabelPrefix' => 'config-mysql-',
'values' => $engines
));
$s .= $this->parent->getHelpBox( 'config-mysql-engine-help' );
$this->getVar( 'wgDBpassword' ),
false,
false,
- 0,
+ 0,
$this->getVar( 'wgDBprefix' )
);
} catch ( DBConnectionError $e ) {
/**
* Class for setting up the MediaWiki database using Oracle.
- *
+ *
* @ingroup Deployment
* @since 1.17
*/
Html::element( 'legend', array(), wfMsg( 'config-db-web-account' ) ) .
Html::openElement( 'div', array( 'id' => 'dbOtherAccount' ) ) .
$this->getTextBox( 'wgDBuser', 'config-db-username' ) .
- $this->getPasswordBox( 'wgDBpassword', 'config-db-password' ) .
- $this->parent->getHelpBox( 'config-db-web-help' ).
+ $this->getPasswordBox( 'wgDBpassword', 'config-db-password', array(), $this->parent->getHelpBox( 'config-db-web-help' ) ) .
$this->getCheckBox( '_CreateDBAccount', 'config-db-web-create', array( 'disabled' => true ) ).
Html::closeElement( 'div' ) . Html::closeElement( 'fieldset' );
}
$this->parent->setVar( '_InstallUser', 'sys' );
$this->parent->setVar( 'wgDBserver', '' );
return
- $this->getTextBox( 'wgDBserver', 'config-db-host-oracle' ) .
- $this->parent->getHelpBox( 'config-db-host-oracle-help' ) .
+ $this->getTextBox( 'wgDBserver', 'config-db-host-oracle', array(), $this->parent->getHelpBox( 'config-db-host-oracle-help' ) ) .
Html::openElement( 'fieldset' ) .
Html::element( 'legend', array(), wfMsg( 'config-db-wiki-settings' ) ) .
$this->getTextBox( 'wgDBprefix', 'config-db-prefix' ) .
$this->getTextBox( '_OracleDefTS', 'config-oracle-def-ts' ) .
- $this->getTextBox( '_OracleTempTS', 'config-oracle-temp-ts' ) .
- $this->parent->getHelpBox( 'config-db-oracle-help' ) .
+ $this->getTextBox( '_OracleTempTS', 'config-oracle-temp-ts', array(), $this->parent->getHelpBox( 'config-db-oracle-help' ) ) .
Html::closeElement( 'fieldset' ) .
$this->getInstallUserBox().
$this->getWebUserBox();
/**
* Class for setting up the MediaWiki database using Postgres.
- *
+ *
* @ingroup Deployment
* @since 1.17
*/
function getConnectForm() {
return
- $this->getTextBox( 'wgDBserver', 'config-db-host' ) .
- $this->parent->getHelpBox( 'config-db-host-help' ) .
+ $this->getTextBox( 'wgDBserver', 'config-db-host', array(), $this->parent->getHelpBox( 'config-db-host-help' ) ) .
$this->getTextBox( 'wgDBport', 'config-db-port' ) .
Html::openElement( 'fieldset' ) .
Html::element( 'legend', array(), wfMsg( 'config-db-wiki-settings' ) ) .
- $this->getTextBox( 'wgDBname', 'config-db-name' ) .
- $this->parent->getHelpBox( 'config-db-name-help' ) .
- $this->getTextBox( 'wgDBmwschema', 'config-db-schema' ) .
+ $this->getTextBox( 'wgDBname', 'config-db-name', array(), $this->parent->getHelpBox( 'config-db-name-help' ) ) .
+ $this->getTextBox( 'wgDBmwschema', 'config-db-schema', array(), $this->parent->getHelpBox( 'config-db-schema-help' ) ) .
$this->getTextBox( 'wgDBts2schema', 'config-db-ts2-schema' ) .
- $this->parent->getHelpBox( 'config-db-schema-help' ) .
Html::closeElement( 'fieldset' ) .
$this->getInstallUserBox();
}
function submitConnectForm() {
// Get variables from the request
- $newValues = $this->setVarsFromRequest( array( 'wgDBserver', 'wgDBport',
+ $newValues = $this->setVarsFromRequest( array( 'wgDBserver', 'wgDBport',
'wgDBname', 'wgDBmwschema', 'wgDBts2schema' ) );
// Validate them
/**
* Class for setting up the MediaWiki database using SQLLite.
- *
+ *
* @ingroup Deployment
* @since 1.17
*/
}
public function getConnectForm() {
- return $this->getTextBox( 'wgSQLiteDataDir', 'config-sqlite-dir' ) .
- $this->parent->getHelpBox( 'config-sqlite-dir-help' ) .
- $this->getTextBox( 'wgDBname', 'config-db-name' ) .
- $this->parent->getHelpBox( 'config-sqlite-name-help' );
+ return $this->getTextBox( 'wgSQLiteDataDir', 'config-sqlite-dir', array(), $this->parent->getHelpBox( 'config-sqlite-dir-help' ) ) .
+ $this->getTextBox( 'wgDBname', 'config-db-name', array(), $this->parent->getHelpBox( 'config-sqlite-name-help' ) );
}
public function submitConnectForm() {
array_shift( $args );
$args = array_map( 'htmlspecialchars', $args );
$text = wfMsgReal( $msg, $args, false, false, false );
- $html = $this->parse( $text, true );
-
+ $html = htmlspecialchars( $text );
+ //$html = $this->parse( $text, true );
return
- "<div class=\"config-help-wrapper\">\n" .
- "<div class=\"config-help-message\">\n" .
- $html .
- "</div>\n" .
- "<div class=\"config-show-help\">\n" .
- "<a href=\"#\">" .
- wfMsgHtml( 'config-show-help' ) .
- "</a></div>\n" .
- "<div class=\"config-hide-help\">\n" .
- "<a href=\"#\">" .
- wfMsgHtml( 'config-hide-help' ) .
- "</a></div>\n</div>\n";
+ "<span class=\"mw-help-field-hint\"\n" .
+ " title=\"" . $html . "\"\n" .
+ " original-title=\"" . $html . "\"></span>\n";
}
/**
* Label a control by wrapping a config-input div around it and putting a
* label before it.
*/
- public function label( $msg, $forId, $contents ) {
+ public function label( $msg, $forId, $contents, $helpData = "" ) {
if ( strval( $msg ) == '' ) {
$labelText = ' ';
} else {
}
return
- "<div class=\"config-input\">\n" .
+ "<div class=\"config-block\">\n" .
+ " <div class=\"config-block-label\">\n" .
Xml::tags( 'label',
$attributes,
$labelText ) . "\n" .
- $contents .
+ $helpData .
+ " </div>\n" .
+ " <div class=\"config-block-elements\">\n" .
+ $contents .
+ " </div>\n" .
"</div>\n";
}
* attribs: Additional attributes for the input element (optional)
* controlName: The name for the input element (optional)
* value: The current value of the variable (optional)
+ * help: The html for the help text (optional)
*/
public function getTextBox( $params ) {
if ( !isset( $params['controlName'] ) ) {
if ( !isset( $params['attribs'] ) ) {
$params['attribs'] = array();
}
-
+ if ( !isset( $params['help'] ) ) {
+ $params['help'] = "";
+ }
return
$this->label(
$params['label'],
'class' => 'config-input-text',
'tabindex' => $this->nextTabIndex()
)
- )
+ ),
+ $params['help']
);
}
* attribs: Additional attributes for the input element (optional)
* controlName: The name for the input element (optional)
* value: The current value of the variable (optional)
+ * help: The html for the help text (optional)
*/
public function getPasswordBox( $params ) {
if ( !isset( $params['value'] ) ) {
* attribs: Additional attributes for the input element (optional)
* controlName: The name for the input element (optional)
* value: The current value of the variable (optional)
+ * help: The html for the help text (optional)
*/
public function getCheckBox( $params ) {
if ( !isset( $params['controlName'] ) ) {
if ( !isset( $params['attribs'] ) ) {
$params['attribs'] = array();
}
-
+ if ( !isset( $params['help'] ) ) {
+ $params['help'] = "";
+ }
if( isset( $params['rawtext'] ) ) {
$labelText = $params['rawtext'];
} else {
return
"<div class=\"config-input-check\">\n" .
- "<label>\n" .
+ $params['help'] .
+ "<label>\n" .
Xml::check(
$params['controlName'],
$params['value'],
) .
$labelText . "\n" .
"</label>\n" .
+ $params['help'] .
"</div>\n";
}
* commonAttribs Attribute array applied to all items
* controlName: The name for the input element (optional)
* value: The current value of the variable (optional)
+ * help: The html for the help text (optional)
*/
public function getRadioSet( $params ) {
if ( !isset( $params['controlName'] ) ) {
if ( !isset( $params['label'] ) ) {
$label = '';
} else {
- $label = $this->parse( wfMsgNoTrans( $params['label'] ) );
+ $label = $params['label'];
}
-
- $s = "<label class=\"config-label\">\n" .
- $label .
- "</label>\n" .
- "<ul class=\"config-settings-block\">\n";
+ if ( !isset( $params['help'] ) ) {
+ $params['help'] = "";
+ }
+ $s = "<ul>\n";
foreach ( $params['values'] as $value ) {
$itemAttribs = array();
}
$s .= "</ul>\n";
- return $s;
+
+ return $this->label( $label, $params['controlName'], $s, $params['help'] );
}
/**
/**
* Output class modelled on OutputPage.
*
- * I've opted to use a distinct class rather than derive from OutputPage here in
- * the interests of separation of concerns: if we used a subclass, there would be
- * quite a lot of things you could do in OutputPage that would break the installer,
- * that wouldn't be immediately obvious.
- *
+ * I've opted to use a distinct class rather than derive from OutputPage here in
+ * the interests of separation of concerns: if we used a subclass, there would be
+ * quite a lot of things you could do in OutputPage that would break the installer,
+ * that wouldn't be immediately obvious.
+ *
* @ingroup Deployment
* @since 1.17
*/
class WebInstallerOutput {
/**
* The WebInstaller object this WebInstallerOutput is used by.
- *
+ *
* @var WebInstaller
- */
+ */
public $parent;
/**
/**
* Constructor.
- *
+ *
* @param $parent WebInstaller
*/
public function __construct( WebInstaller $parent ) {
<?php echo Html::linkedStyle( $this->getCssUrl() ) . "\n"; ?>
<?php echo Html::inlineScript( "var dbTypes = " . Xml::encodeJsVar( $dbTypes ) ) . "\n"; ?>
<?php echo $this->getJQuery() . "\n"; ?>
+ <?php echo $this->getJQueryTipsy() . "\n"; ?>
<?php echo Html::linkedScript( '../skins/common/config.js' ) . "\n"; ?>
</head>
<?php echo Html::openElement( 'body', array( 'class' => $this->getDir() ) ) . "\n"; ?>
-<noscript>
-<style type="text/css">
-.config-help-message { display: block; }
-.config-show-help { display: none; }
-</style>
-</noscript>
<div id="mw-page-base"></div>
<div id="mw-head-base"></div>
<div id="content">
<title><?php $this->outputTitle(); ?></title>
<?php echo Html::linkedStyle( $this->getCssUrl() ) . "\n"; ?>
<?php echo $this->getJQuery(); ?>
+ <?php echo $this->getJQueryTipsy() . "\n"; ?>
<?php echo Html::linkedScript( '../skins/common/config.js' ); ?>
</head>
public function getJQuery() {
return Html::linkedScript( "../resources/jquery/jquery.js" );
}
-
- public function outputWarnings() {
- $this->addHTML( $this->warnings );
- $this->warnings = '';
+ public function getJQueryTipsy() {
+ return Html::linkedScript( "../resources/jquery/jquery.tipsy.js" );
}
-
}
/**
* Abstract class to define pages for the web installer.
- *
+ *
* @ingroup Deployment
* @since 1.17
*/
/**
* The WebInstaller object this WebInstallerPage belongs to.
- *
+ *
* @var WebInstaller
*/
public $parent;
/**
* Constructor.
- *
+ *
* @param $parent WebInstaller
*/
public function __construct( WebInstaller $parent ) {
}
$this->startForm();
$s = Html::hidden( 'LanguageRequestTime', time() ) .
- $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->parent->getCheckBox(
- array( 'var' => '_ExternalHTTP', 'label' => 'config-allow-requests' )
- ) . $this->parent->getHelpBox( 'config-allow-requests-help' );
+ $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->parent->getCheckBox(
+ array(
+ 'var' => '_ExternalHTTP',
+ 'label' => 'config-allow-requests',
+ 'help' => $this->parent->getHelpBox( 'config-allow-requests-help' )
+ )
+ );
$this->addHTML( $s );
$this->endForm();
$this->parent->output->addWikiText( wfMsgNoTrans( 'config-welcome' ) );
$status = $this->parent->doEnvironmentChecks();
if ( $status ) {
- $this->parent->output->addWikiText( wfMsgNoTrans( 'config-copyright',
+ $this->parent->output->addWikiText( wfMsgNoTrans( 'config-copyright',
SpecialVersion::getCopyrightAndAuthorList() ) );
$this->startForm();
$this->endForm();
$dbSupport = '';
foreach( $this->parent->getDBTypes() as $type ) {
$db = 'Database' . ucfirst( $type );
- $dbSupport .= wfMsgNoTrans( "config-support-$type",
+ $dbSupport .= wfMsgNoTrans( "config-support-$type",
call_user_func( array( $db, 'getSoftwareLink' ) ) ) . "\n";
}
$this->addHTML( $this->parent->getInfoBox(
$this->parent->getTextBox( array(
'var' => 'wgSitename',
'label' => 'config-site-name',
+ 'help' => $this->parent->getHelpBox( 'config-site-name-help' )
) ) .
- $this->parent->getHelpBox( 'config-site-name-help' ) .
$this->parent->getRadioSet( array(
'var' => '_NamespaceType',
'label' => 'config-project-namespace',
'itemLabelPrefix' => 'config-ns-',
'values' => array( 'site-name', 'generic', 'other' ),
'commonAttribs' => array( 'class' => 'enableForOther', 'rel' => 'config_wgMetaNamespace' ),
+ 'help' => $this->parent->getHelpBox( 'config-project-namespace-help' )
) ) .
$this->parent->getTextBox( array(
'var' => 'wgMetaNamespace',
'label' => '', //TODO: Needs a label?
'attribs' => array( 'readonly' => 'readonly', 'class' => 'enabledByOther' ),
+
) ) .
- $this->parent->getHelpBox( 'config-project-namespace-help' ) .
$this->getFieldSetStart( 'config-admin-box' ) .
$this->parent->getTextBox( array(
'var' => '_AdminName',
'var' => '_AdminPassword2',
'label' => 'config-admin-password-confirm'
) ) .
- $this->parent->getHelpBox( 'config-admin-help' ) .
$this->parent->getTextBox( array(
'var' => '_AdminEmail',
- 'label' => 'config-admin-email'
+ 'label' => 'config-admin-email',
+ 'help' => $this->parent->getHelpBox( 'config-admin-email-help' )
) ) .
- $this->parent->getHelpBox( 'config-admin-email-help' ) .
$this->parent->getCheckBox( array(
'var' => '_Subscribe',
- 'label' => 'config-subscribe'
+ 'label' => 'config-subscribe',
+ 'help' => $this->parent->getHelpBox( 'config-subscribe-help' )
) ) .
- $this->parent->getHelpBox( 'config-subscribe-help' ) .
$this->getFieldSetEnd() .
$this->parent->getInfoBox( wfMsg( 'config-almost-done' ) ) .
$this->parent->getRadioSet( array(
// Validate password
$msg = false;
+ $valid = false;
$pwd = $this->getVar( '_AdminPassword' );
$user = User::newFromName( $cname );
$valid = $user && $user->getPasswordValidity( $pwd );
}
$extHtml .= $this->parent->getHelpBox( 'config-extensions-help' ) .
- $this->getFieldSetEnd();
+ $this->getFieldSetEnd();
$this->addHTML( $extHtml );
}
$this->addHTML(
# Uploading
$this->getFieldSetStart( 'config-upload-settings' ) .
- $this->parent->getCheckBox( array(
+ $this->parent->getCheckBox( array(
'var' => 'wgEnableUploads',
'label' => 'config-upload-enable',
'attribs' => array( 'class' => 'showHideRadio', 'rel' => 'uploadwrapper' ),
+ 'help' => $this->parent->getHelpBox( 'config-upload-help' )
) ) .
- $this->parent->getHelpBox( 'config-upload-help' ) .
'<div id="uploadwrapper" style="display: none;">' .
- $this->parent->getTextBox( array(
+ $this->parent->getTextBox( array(
'var' => 'wgDeletedDirectory',
'label' => 'config-upload-deleted',
+ 'help' => $this->parent->getHelpBox( 'config-upload-deleted-help' )
) ) .
- $this->parent->getHelpBox( 'config-upload-deleted-help' ) .
'</div>' .
$this->parent->getTextBox( array(
'var' => 'wgLogo',
- 'label' => 'config-logo'
- ) ) .
- $this->parent->getHelpBox( 'config-logo-help' )
+ 'label' => 'config-logo',
+ 'help' => $this->parent->getHelpBox( 'config-logo-help' )
+ ) )
);
$canUse = $this->getVar( '_ExternalHTTP' ) ?
'config-instantcommons-good' : 'config-instantcommons-bad';
$this->parent->getCheckBox( array(
'var' => 'wgUseInstantCommons',
'label' => 'config-instantcommons',
+ 'help' => $this->parent->getHelpBox( 'config-instantcommons-help', wfMsgNoTrans( $canUse ) )
) ) .
- $this->parent->getHelpBox( 'config-instantcommons-help', wfMsgNoTrans( $canUse ) ) .
$this->getFieldSetEnd()
);
$this->parent->getTextBox( array(
'var' => '_MemCachedServers',
'label' => 'config-memcached-servers',
+ 'help' => $this->parent->getHelpBox( 'config-memcached-help' )
) ) .
- $this->parent->getHelpBox( 'config-memcached-help' ) . '</div>' .
+ '</div>' .
$this->getFieldSetEnd()
);
$this->endForm();