Use $this->checkReadOnly() for read only database check in Special:Invalidateemail
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Mon, 18 Feb 2013 11:05:25 +0000 (12:05 +0100)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Mon, 18 Feb 2013 11:05:25 +0000 (12:05 +0100)
This makes that check consistent with the one used in Special:Confirmemail.

Change-Id: I5f25c39f0fe6d3e362874f74d9b64fb330446abc

includes/specials/SpecialConfirmemail.php

index 3e9ce12..85a415d 100644 (file)
@@ -145,9 +145,7 @@ class EmailInvalidation extends UnlistedSpecialPage {
        function execute( $code ) {
                $this->setHeaders();
 
-               if ( wfReadOnly() ) {
-                       throw new ReadOnlyError;
-               }
+               $this->checkReadOnly();
 
                $this->attemptInvalidate( $code );
        }