From 98396c3984e8afe139bfca37ec495483360d0353 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sun, 19 Aug 2012 10:51:23 +0200 Subject: [PATCH] Use ErrorPageError extension in Special:Preferences. For consistency with other errors, use an exception when the user is not logged in. Change-Id: I1a9cc37b57281665a5081ad65bb1e34253c64224 --- includes/specials/SpecialPreferences.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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(); -- 2.20.1