diff options
Diffstat (limited to 'includes/specials/SpecialUserlogout.php')
-rw-r--r-- | includes/specials/SpecialUserlogout.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/includes/specials/SpecialUserlogout.php b/includes/specials/SpecialUserlogout.php new file mode 100644 index 00000000..137eadb4 --- /dev/null +++ b/includes/specials/SpecialUserlogout.php @@ -0,0 +1,23 @@ +<?php +/** + * @file + * @ingroup SpecialPage + */ + +/** + * constructor + */ +function wfSpecialUserlogout() { + global $wgUser, $wgOut; + + $oldName = $wgUser->getName(); + $wgUser->logout(); + $wgOut->setRobotpolicy( 'noindex,nofollow' ); + + // Hook. + $injected_html = ''; + wfRunHooks( 'UserLogoutComplete', array(&$wgUser, &$injected_html, $oldName) ); + + $wgOut->addHTML( wfMsgExt( 'logouttext', array( 'parse' ) ) . $injected_html ); + $wgOut->returnToMain(); +} |