2004-02-18 02:15:00 +00:00
|
|
|
<?php
|
2004-09-02 23:28:24 +00:00
|
|
|
/**
|
|
|
|
|
*
|
2007-01-20 15:09:52 +00:00
|
|
|
* @addtogroup SpecialPage
|
2004-09-02 23:28:24 +00:00
|
|
|
*/
|
2003-04-14 23:10:40 +00:00
|
|
|
|
2004-09-02 23:28:24 +00:00
|
|
|
/**
|
|
|
|
|
* constructor
|
|
|
|
|
*/
|
|
|
|
|
function wfSpecialUserlogout() {
|
2005-12-04 18:27:59 +00:00
|
|
|
global $wgUser, $wgOut;
|
2003-04-14 23:10:40 +00:00
|
|
|
|
Changed the calling protocol for function wfRunHooks() in Hooks.php.
Previously, this function used variable arguments to allow
different hooks to pass different parameters. However, var args
silently convert reference-calling to value-calling. So a call
that used to work like this:
# old
wfRunHooks('SomeEvent', $param1, &$param2, $param3);
...now works like this:
# new
wfRunHooks('SomeEvent', array($param1, &$param2, $param3));
Hook functions can now change pass-by-reference parameters correctly
(e.g. $param2 in the above example).
All calls to wfRunHooks() were changed and tested, and the change
was documented in docs/hooks.doc. This change was originally checked
in on REL1_4 branch as a bugfix, but per vibber reverted and checked
in to HEAD instead.
2005-03-13 15:29:43 +00:00
|
|
|
if (wfRunHooks('UserLogout', array(&$wgUser))) {
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2004-11-27 23:10:05 +00:00
|
|
|
$wgUser->logout();
|
Changed the calling protocol for function wfRunHooks() in Hooks.php.
Previously, this function used variable arguments to allow
different hooks to pass different parameters. However, var args
silently convert reference-calling to value-calling. So a call
that used to work like this:
# old
wfRunHooks('SomeEvent', $param1, &$param2, $param3);
...now works like this:
# new
wfRunHooks('SomeEvent', array($param1, &$param2, $param3));
Hook functions can now change pass-by-reference parameters correctly
(e.g. $param2 in the above example).
All calls to wfRunHooks() were changed and tested, and the change
was documented in docs/hooks.doc. This change was originally checked
in on REL1_4 branch as a bugfix, but per vibber reverted and checked
in to HEAD instead.
2005-03-13 15:29:43 +00:00
|
|
|
|
|
|
|
|
wfRunHooks('UserLogoutComplete', array(&$wgUser));
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2004-11-27 23:10:05 +00:00
|
|
|
$wgOut->setRobotpolicy( 'noindex,nofollow' );
|
2006-04-29 13:15:19 +00:00
|
|
|
$wgOut->addHTML( wfMsgExt( 'logouttext', array( 'parse' ) ) );
|
2004-11-27 23:10:05 +00:00
|
|
|
$wgOut->returnToMain();
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2004-11-27 23:10:05 +00:00
|
|
|
}
|
2003-04-14 23:10:40 +00:00
|
|
|
}
|
|
|
|
|
|
2007-06-29 01:19:14 +00:00
|
|
|
|