From: Alexandre Emsenhuber Date: Sun, 19 Aug 2012 08:51:23 +0000 (+0200) Subject: Use ErrorPageError extension in Special:Preferences. X-Git-Tag: 1.31.0-rc.0~22680^2 X-Git-Url: http://git.cyclocoop.org/%22.%28%24lien.?a=commitdiff_plain;h=98396c3984e8afe139bfca37ec495483360d0353;p=lhc%2Fweb%2Fwiklou.git Use ErrorPageError extension in Special:Preferences. For consistency with other errors, use an exception when the user is not logged in. Change-Id: I1a9cc37b57281665a5081ad65bb1e34253c64224 --- diff --git a/includes/specials/SpecialPreferences.php b/includes/specials/SpecialPreferences.php index b69354cdde..c6b2bb6b9d 100644 --- a/includes/specials/SpecialPreferences.php +++ b/includes/specials/SpecialPreferences.php @@ -39,8 +39,7 @@ class SpecialPreferences extends SpecialPage { $user = $this->getUser(); if ( $user->isAnon() ) { - $out->showErrorPage( 'prefsnologin', 'prefsnologintext', array( $this->getTitle()->getPrefixedDBkey() ) ); - return; + throw new ErrorPageError( 'prefsnologin', 'prefsnologintext', array( $this->getTitle()->getPrefixedDBkey() ) ); } $this->checkReadOnly();