* (bug 1850) Additional fixes so existing local and remote images
[lhc/web/wiklou.git] / includes / SpecialUserlogout.php
index d62703c..58da683 100644 (file)
@@ -1,19 +1,28 @@
 <?php
 /**
  *
+ * @package MediaWiki
+ * @subpackage SpecialPage
  */
 
 /**
  * constructor
  */
 function wfSpecialUserlogout() {
-       global $wgUser, $wgOut, $returnto;
+       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();
+               
+       }
 }
 
 ?>