Index: trunk/phase3/includes/installer/WebInstaller.php |
— | — | @@ -981,12 +981,20 @@ |
982 | 982 | } |
983 | 983 | $this->parent->output->addWikiText( wfMsgNoTrans( 'config-welcome' ) ); |
984 | 984 | $status = $this->parent->doEnvironmentChecks(); |
985 | | - if ( $status ) { |
| 985 | + if ( $status->isOk() ) { |
986 | 986 | $this->parent->output->addWikiText( wfMsgNoTrans( 'config-copyright', wfMsg( 'config-authors' ) ) ); |
987 | 987 | $this->startForm(); |
988 | 988 | $this->endForm(); |
989 | 989 | } |
990 | 990 | } |
| 991 | + |
| 992 | + public function beginEnvCheck( $step ) { |
| 993 | + |
| 994 | + } |
| 995 | + |
| 996 | + public function endEnvCheck( $step, $status ) { |
| 997 | + |
| 998 | + } |
991 | 999 | } |
992 | 1000 | |
993 | 1001 | class WebInstaller_DBConnect extends WebInstallerPage { |
Index: trunk/phase3/includes/installer/Installer.php |
— | — | @@ -298,15 +298,17 @@ |
299 | 299 | * Under the web subclass, it can already be assumed that PHP 5+ is in use |
300 | 300 | * and that sessions are working. |
301 | 301 | */ |
302 | | - function doEnvironmentChecks() { |
| 302 | + function doEnvironmentChecks( $beginCB, $endCB ) { |
303 | 303 | $this->showMessage( 'config-env-php', phpversion() ); |
304 | 304 | |
305 | 305 | $good = true; |
306 | 306 | foreach ( $this->envChecks as $check ) { |
| 307 | + call_user_func_array( $beginCB, array( $check ) ); |
307 | 308 | $status = $this->$check(); |
308 | 309 | if ( $status === false ) { |
309 | 310 | $good = false; |
310 | 311 | } |
| 312 | + call_user_func_array( $endCB, array( $check, $status ) ); |
311 | 313 | } |
312 | 314 | $this->setVar( '_Environment', $good ); |
313 | 315 | if ( $good ) { |
Index: trunk/phase3/includes/api/ApiMain.php |
— | — | @@ -385,6 +385,8 @@ |
386 | 386 | if ( !is_null( $requestid ) ) { |
387 | 387 | $this->getResult()->addValue( null, 'requestid', $requestid ); |
388 | 388 | } |
| 389 | + // servedby is especially useful when debugging errors |
| 390 | + $this->getResult()->addValue( null, 'servedby', wfHostName() ); |
389 | 391 | $this->getResult()->addValue( null, 'error', $errMessage ); |
390 | 392 | |
391 | 393 | return $errMessage['code']; |
— | — | @@ -399,6 +401,10 @@ |
400 | 402 | if ( !is_null( $requestid ) ) { |
401 | 403 | $this->getResult()->addValue( null, 'requestid', $requestid ); |
402 | 404 | } |
| 405 | + $servedby = $this->getParameter( 'servedby' ); |
| 406 | + if( !is_null( $servedby ) ) { |
| 407 | + $this->getResult()->addValue( null, 'servedby', wfHostName() ); |
| 408 | + } |
403 | 409 | |
404 | 410 | $params = $this->extractRequestParams(); |
405 | 411 | |
— | — | @@ -591,6 +597,7 @@ |
592 | 598 | ApiBase::PARAM_DFLT => 0 |
593 | 599 | ), |
594 | 600 | 'requestid' => null, |
| 601 | + 'servedby' => false, |
595 | 602 | ); |
596 | 603 | } |
597 | 604 | |
— | — | @@ -606,6 +613,7 @@ |
607 | 614 | 'smaxage' => 'Set the s-maxage header to this many seconds. Errors are never cached', |
608 | 615 | 'maxage' => 'Set the max-age header to this many seconds. Errors are never cached', |
609 | 616 | 'requestid' => 'Request ID to distinguish requests. This will just be output back to you', |
| 617 | + 'servedby' => 'Include the hostname that served the request in the results. Unconditionally shown on error', |
610 | 618 | ); |
611 | 619 | } |
612 | 620 | |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -264,6 +264,8 @@ |
265 | 265 | * (bug 24136) unknownerror when adding new section without summary, but forceditsummary |
266 | 266 | * (bug 16886) Sister projects box moves down the extract of the first result in IE 7. |
267 | 267 | * (bug 22339) Added srwhat=nearmatch to list=search to get a "go" result |
| 268 | +* (bug 24303) Added new &servedby parameter to all actions which adds the hostname |
| 269 | + that served the request to the result. It is also added unconditionally on error |
268 | 270 | |
269 | 271 | === Languages updated in 1.17 === |
270 | 272 | |