* (bug 24136) unknownerror when adding new section without summary, but forceditsummary
* (bug 16886) Sister projects box moves down the extract of the first result in IE 7.
* (bug 22339) Added srwhat=nearmatch to list=search to get a "go" result
+* (bug 24303) Added new &servedby parameter to all actions which adds the hostname
+ that served the request to the result. It is also added unconditionally on error
=== Languages updated in 1.17 ===
if ( !is_null( $requestid ) ) {
$this->getResult()->addValue( null, 'requestid', $requestid );
}
+ // servedby is especially useful when debugging errors
+ $this->getResult()->addValue( null, 'servedby', wfHostName() );
$this->getResult()->addValue( null, 'error', $errMessage );
return $errMessage['code'];
if ( !is_null( $requestid ) ) {
$this->getResult()->addValue( null, 'requestid', $requestid );
}
+ $servedby = $this->getParameter( 'servedby' );
+ if( !is_null( $servedby ) ) {
+ $this->getResult()->addValue( null, 'servedby', wfHostName() );
+ }
$params = $this->extractRequestParams();
ApiBase::PARAM_DFLT => 0
),
'requestid' => null,
+ 'servedby' => false,
);
}
'smaxage' => 'Set the s-maxage header to this many seconds. Errors are never cached',
'maxage' => 'Set the max-age header to this many seconds. Errors are never cached',
'requestid' => 'Request ID to distinguish requests. This will just be output back to you',
+ 'servedby' => 'Include the hostname that served the request in the results. Unconditionally shown on error',
);
}
* Under the web subclass, it can already be assumed that PHP 5+ is in use
* and that sessions are working.
*/
- function doEnvironmentChecks() {
+ function doEnvironmentChecks( $beginCB, $endCB ) {
$this->showMessage( 'config-env-php', phpversion() );
$good = true;
foreach ( $this->envChecks as $check ) {
+ call_user_func_array( $beginCB, array( $check ) );
$status = $this->$check();
if ( $status === false ) {
$good = false;
}
+ call_user_func_array( $endCB, array( $check, $status ) );
}
$this->setVar( '_Environment', $good );
if ( $good ) {
}
$this->parent->output->addWikiText( wfMsgNoTrans( 'config-welcome' ) );
$status = $this->parent->doEnvironmentChecks();
- if ( $status ) {
+ if ( $status->isOk() ) {
$this->parent->output->addWikiText( wfMsgNoTrans( 'config-copyright', wfMsg( 'config-authors' ) ) );
$this->startForm();
$this->endForm();
}
}
+
+ public function beginEnvCheck( $step ) {
+
+ }
+
+ public function endEnvCheck( $step, $status ) {
+
+ }
}
class WebInstaller_DBConnect extends WebInstallerPage {