* (bug 1850) Additional fixes so existing local and remote images
[lhc/web/wiklou.git] / includes / SpecialUserlogout.php
index 182c9bf..58da683 100644 (file)
@@ -1,14 +1,28 @@
 <?php
+/**
+ *
+ * @package MediaWiki
+ * @subpackage SpecialPage
+ */
 
-function wfSpecialUserlogout()
-{
-       global $wgUser, $wgOut, $returnto;
+/**
+ * constructor
+ */
+function wfSpecialUserlogout() {
+       global $wgUser, $wgOut;
 
-       $wgUser->logout();
-       $wgOut->mCookies = array();
-       $wgOut->setRobotpolicy( "noindex,nofollow" );
-       $wgOut->addHTML( wfMsg( "logouttext" ) );
-       $wgOut->returnToMain();
+       if (wfRunHooks('UserLogout', array(&$wgUser))) {
+               
+               $wgUser->logout();
+
+               wfRunHooks('UserLogoutComplete', array(&$wgUser));
+               
+               $wgOut->mCookies = array();
+               $wgOut->setRobotpolicy( 'noindex,nofollow' );
+               $wgOut->addHTML( wfMsg( 'logouttext' ) );
+               $wgOut->returnToMain();
+               
+       }
 }
 
 ?>