10 function wfSpecialUserlogout() {
11 global $wgUser, $wgOut;
14 * Some satellite ISPs use broken precaching schemes that log people out straight after
15 * they're logged in (bug 17790). Luckily, there's a way to detect such requests.
17 if ( isset( $_SERVER['REQUEST_URI'] ) && strpos( $_SERVER['REQUEST_URI'], '&' ) !== false ) {
18 wfDebug( "Special:Userlogout request {$_SERVER['REQUEST_URI']} looks suspicious, denying.\n" );
19 wfHttpError( 400, wfMsg( 'loginerror' ), wfMsg( 'suspicious-userlogout' ) );
23 $oldName = $wgUser->getName();
25 $wgOut->setRobotPolicy( 'noindex,nofollow' );
29 wfRunHooks( 'UserLogoutComplete', array(&$wgUser, &$injected_html, $oldName) );
31 $wgOut->addHTML( wfMsgExt( 'logouttext', array( 'parse' ) ) . $injected_html );
32 $wgOut->returnToMain();